-
Notifications
You must be signed in to change notification settings - Fork 270
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
feat(ui5-menu): Enhance keyboard navigation #10243
base: main
Are you sure you want to change the base?
Conversation
get _navigableItems() { | ||
return [...this.endContent] as Array<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 will be better to have it as a return type of the getter.
get _navigableItems() : Array<HTMLElement> {
return [...this.endContent];
}
if (isRight(e)) { | ||
item._navigateToEndContent(); | ||
} else if (isLeft(e)) { | ||
item._navigateToEndContent(true); | ||
} |
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 can be merged into one if, but it's up to you, just a suggestion
If ( isRight or isLeft) then item,_navigateToEndContent(isLeft)
|
||
if (shouldOpenMenu) { | ||
this._openItemSubMenu(item); | ||
} else if ((shouldCloseMenu || isTabNextPrevoius) && parentElement._popover) { |
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.
I know this parentElement._popover check is just moved. but we can think of a better one. like parentElement === opener, or we can just remove the parent element and use the opener.
if (shouldOpenMenu) { | ||
this._openItemSubMenu(item); | ||
} else if ((shouldCloseMenu || isTabNextPrevoius) && parentElement._popover) { | ||
parentElement._popover.open = false; |
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 in future should also be changed. if we want to change "parent" property, we fire an event and the parent changes the property based on that.
After this change, it will be possible to navigate through the elements added to the endContent using the left and right arrow keys on the keyboard
BGSOFUIBALKAN-8852