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

[Accessibility] Sidenav missing close handler when opened by keyboard interaction #542

Open
3 tasks done
Tracked by #543
gselderslaghs opened this issue Dec 7, 2024 · 2 comments
Open
3 tasks done
Tracked by #543
Labels
enhancement New feature or request

Comments

@gselderslaghs
Copy link
Member

gselderslaghs commented Dec 7, 2024

Before submitting...

Context

When using the Sidenav component, the element can not be closed by keyboard interaction

Current Behavior

Close sidenav is not possible by keyboard interaction

Codepen example

Expected behavior

Component should be closable by mouse and keyboard input

Possible Solutions or Causes

Implement the necessary functional attributes on initialization in order to make open/close button tabbable/focusable by keyboard interaction

Your Environment

  • Version used: 2.1.1
@gselderslaghs gselderslaghs added the enhancement New feature or request label Dec 12, 2024
@gselderslaghs
Copy link
Member Author

I think we can implement a tabbable close link that is hidden by default, similar as idea in #234
The close functionality already exists in the Sidenav component by adding sidenav-close class

@gselderslaghs
Copy link
Member Author

Please check out this CodePen example with a possible solution, I'd like to hear what's your thoughts on this approach
I've implemented the close link with a styling class to hide the element by default and make it accessible by focus state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant