zotero / zotero-connectors

Chrome, Firefox, Edge, and Safari extensions for Zotero
https://www.zotero.org/download/connectors
Other
513 stars 121 forks source link

vpat: no focus shift if expanded via keypress #468

Open abaevbog opened 5 months ago

abaevbog commented 5 months ago

Do not shift focus onto the collection row if the target selector was opened via keypress and not via mouse click. This was not explicitly reported during VPAT review but vpat 44 (addressed in https://github.com/zotero/zotero/pull/4069) raises a similar issue where focus should not move on button click per https://www.w3.org/WAI/WCAG21/Understanding/on-input

With voiceover enabled, if you focus the button and press space to click it, focus will jump to the collection tree, which is not quite expected and can be disorientating. Just like in that PR, I think a decent compromise is to keep focus on the twisty if keypress happened via keyboard but let focus jump to collection row after mouse click.

We could wait for the fix from https://github.com/zotero/zotero/pull/4069 to be merged and approved by the VPAT reviewers before doing this.