volto icon indicating copy to clipboard operation
volto copied to clipboard

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

Open iRohitSingh opened this issue 1 year ago • 7 comments

Fix #5866

https://github.com/plone/volto/assets/61353484/a27b4519-5cb0-4f3c-aebb-5b1a89699ddb

iRohitSingh avatar Mar 11 '24 15:03 iRohitSingh

Deploy Preview for volto canceled.

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

netlify[bot] avatar Mar 11 '24 15:03 netlify[bot]

Deploy Preview for plone-components canceled.

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

netlify[bot] avatar Mar 11 '24 15:03 netlify[bot]

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

iRohitSingh avatar Mar 11 '24 15:03 iRohitSingh

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

stevepiercy avatar Mar 11 '24 22:03 stevepiercy

@stevepiercy which commit?

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

/cc @ichim-david

sneridagh avatar Mar 19 '24 11:03 sneridagh

@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 avatar Mar 19 '24 12:03 ichim-david

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

stevepiercy avatar Mar 19 '24 18:03 stevepiercy

ok! merging.

sneridagh avatar May 27 '24 10:05 sneridagh