-
Notifications
You must be signed in to change notification settings - Fork 71
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
Navbar : Help Icon tab navigation #2417
Conversation
✅ Deploy Preview for moduswebcomponents ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -295,6 +295,13 @@ export class ModusNavbar { | |||
if (this.helpUrl) window.open(this.helpUrl, '_blank'); | |||
this.helpOpen.emit(); | |||
} | |||
helpMenuKeyHandler(event: KeyboardEvent): void { | |||
if (event.code !== 'Enter') { |
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.
Can we also add support for space
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.
Yes
role="button" | ||
onKeyDown={(event) => this.helpMenuKeyHandler(event)} | ||
aria-label="Help" | ||
tabIndex={0}> | ||
<IconHelp size="24" onClick={(event) => this.helpMenuClickHandler(event)} /> |
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 make sense to move the handling for onclick
to the span
to keep things organized.
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.
Modified
Description
References
Fixes: #1945
Type of change
How Has This Been Tested?
Checklist