-
Notifications
You must be signed in to change notification settings - Fork 7
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
Bookmark all can be activated by spacebar #4770
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks, @rladdusaw ! I had one question here.
@@ -1,4 +1,4 @@ | |||
<div class="checkbox bookmark_all"> | |||
<div class="checkbox bookmark_all" tabindex='0'> |
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.
Could we use a button, rather than a div here? Then we could listen for a click event to catch either the space bar or the enter key. It would also get added to the tab order automatically, without having to specify tabindex.
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.
I gave this a quick test, but it messed up the styling pretty badly. I could do it, but it might take a while to sort out the css.
I added the enter key to the event listener.
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.
Thanks for looking into this! I think the button would be better long term (we wouldn't need to remember the tabindex if we refactor this code in the future, for example), if you can get the CSS sorted. Another benefit is that the button would be navigable by assistive technologies that allow you to navigate by form control (like NVDA).
Resolves #4760