-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(focus): fix focus order in post-megadropdown
component
#4379
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 72a583f The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Related Previews |
Quality Gate passedIssues Measures |
@@ -88,6 +95,14 @@ export class PostMegadropdown { | |||
} | |||
} | |||
|
|||
private getPostListItems(): HTMLElement[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be that the first focusable element of the mega dropdown is not the first post-list-item but the post-list title as it could be a link as well.
const focusableChildren = postListItems.flatMap(el => Array.from(getFocusableChildren(el))); | ||
|
||
return focusableChildren; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const focusableChildren = postListItems.flatMap(el => Array.from(getFocusableChildren(el))); | |
return focusableChildren; | |
return postListItems.flatMap(el => Array.from(getFocusableChildren(el))); |
@@ -98,16 +113,16 @@ export class PostMegadropdown { | |||
ref={el => (this.popoverRef = el)} | |||
> | |||
<div class="megadropdown" onFocusout={e => this.handleFocusout(e)}> | |||
<slot name="megadropdown-title"></slot> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works in desktop but not in mobile, as it puts the back button after the elements.
No description provided.