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

make focus behave like hover for the navigation. #2321

Merged
merged 1 commit into from
May 17, 2019
Merged

make focus behave like hover for the navigation. #2321

merged 1 commit into from
May 17, 2019

Conversation

ahus1
Copy link
Contributor

@ahus1 ahus1 commented Jan 18, 2019

Using :focus-within for dropdown menu.

This is a improvement.

The navigation bar behaves with the keyboard (tab+focus) the same like when using the mouse. Before the change the dropdown didn't work with the keyboard, now it works.

Proposed solution

A dropdown menu will expand when using the keyboard (didn't expand before).
The highlighting on focus will work like on hovering

Tradeoffs

None that I can think of. No additional classes and coupling. No JavaScript necessary.

Testing Done

I've changed the sass file and tested it locally with the Bulma documentation. I can now tab trough the navigation. In Chrome there is a blue standard highlighting for the active menu item when I tab trough (standard browser behavior). The Menu items focused now appear with light grey background - same as hovering. When I reach the "More" menu item, is expands. I can also use shift-tab to move back through the menu.

Screenshot of test attached.
bulma_menu

I've used the same changes on my personal homepage.

@ahus1
Copy link
Contributor Author

ahus1 commented Jan 18, 2019

This might remedy some accessibility issues regarding the menu - #53

@jgthms jgthms merged commit 4d3aad5 into jgthms:master May 17, 2019
@jgthms
Copy link
Owner

jgthms commented May 17, 2019

Nice one! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants