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

Fix block chooser search is not focusable when clicked on add button #5867

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iRohitSingh
Copy link
Contributor

Fix #5866

Screen.Recording.2024-03-11.at.8.36.17.PM.mov

Copy link

netlify bot commented Mar 11, 2024

Deploy Preview for volto canceled.

Name Link
🔨 Latest commit 579e68e
🔍 Latest deploy log https://app.netlify.com/sites/volto/deploys/65ef1e06dbf62f0008c46a29

Copy link

netlify bot commented Mar 11, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 579e68e
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/65ef1e06ffb7660008bc533c

@iRohitSingh
Copy link
Contributor Author

@sneridagh I debugged this issue and in initial implementation there was autofocus but someone removed it. I am not able to pinpoint the person in gitblame. I readded it.

@stevepiercy
Copy link
Collaborator

@iRohitSingh it was part of this commit by @sneridagh. He did some other things with autofocus. I'm not clear what one has to do with the other.

@sneridagh
Copy link
Member

@stevepiercy which commit?

autofocus is meh for a11y things... don't know if that had to be with the removal.

/cc @ichim-david

@ichim-david
Copy link
Sponsor Member

ichim-david commented Mar 19, 2024

@stevepiercy which commit?

autofocus is meh for a11y things... don't know if that had to be with the removal.

/cc @ichim-david

@sneridagh I am in favor of adding the autofocus back as the short version.

You've probably read something similar to this mention https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns.
I have seen examples where once you open something you focus to the first form element that is focusable such as the first input look at react-aria dialog example https://react-spectrum.adobe.com/react-aria/Dialog.html.

For us since it focuses it on the search input if you hit tab you will get to the other block items from the popup which
is not possible right now so not only are you solving the convenience of the sighted users to have the search focused but you can also now use the keyboard tab key to select a block to add which is a plus for the a11y folks that rely on keyboard navigation.

@ichim-david ichim-david self-requested a review March 19, 2024 12:00
@stevepiercy
Copy link
Collaborator

@sneridagh I can't find it now. I may have been mistaken.

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.

Block chooser search is not focusable when clicked on add button.
4 participants