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

Bookmark all can be activated by spacebar #4770

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rladdusaw
Copy link
Contributor

Resolves #4760

@coveralls
Copy link

coveralls commented Mar 4, 2025

Coverage Status

coverage: 95.697%. remained the same
when pulling a249082 on 4760-bookmark-all-tab-order
into a7eb66c on main.

Copy link
Member

@sandbergja sandbergja left a 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'>
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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).

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.

Bookmark All button is not in the tab order
3 participants