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

Add keyboard shortcut and aria attribute to menu button #2342

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

krvpb024
Copy link

@krvpb024 krvpb024 commented Feb 7, 2024

After restore menu toggle to the logo, these things might need to change.

Use resize event listener to set button role

If only set button role in page load, when users resize the browser window from desktop layout to mobile layout, will cause the toggle function to fail.

Set aria-expanded to logo container

After change the button role to logo container, the button in logo container can be removed. And the aria-expanded should set to logo container.

Add keyboard shortcut to logo button

According to ARIA Authoring Practices Guide, the button should add support for Enter and Space key to activate the button. Because that's the native HTML button's behavior, user may expect this function when focus on logo button.

Use addEventListener instead of onClick function

The onClick function will cause the go-to home page link in desktop layout not work. I think it might be the preventDefault method to cause this problem. So I just use the addEventListener method.


Do you follow the guidelines?

@fguillot fguillot merged commit 6eac968 into miniflux:main Feb 8, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants