Skip to content
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

[LuxMenuBar] If no href is supplied, use a <button> tag instead of an <a> tag #410

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

sandbergja
Copy link
Member

Prior to this commit, if you don't supply an href value for a child menu item, Lux will render an tag without an href. This is not focusable, so keyboard users will not be able to activate that menu item.

This helps with pulibrary/allsearch_frontend#443, since it allows us to create menu items that are keyboard-focusable that are not links (in this case, they will be buttons that switch between dark mode and light mode).

… <a> tag

Prior to this commit, if you don't supply an href value for
a child menu item, Lux will render an <a> tag without an
href.  This is not focusable, so keyboard users will not be
able to activate that menu item.

This helps with pulibrary/allsearch_frontend#443,
since it allows us to create menu items that are keyboard
focusable that are not links (in this case, they will be
buttons that switch between dark mode and light mode).
@kevinreiss kevinreiss merged commit 56059b8 into main Feb 7, 2025
7 checks passed
@kevinreiss kevinreiss deleted the button-if-no-href branch February 7, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants