vpat: no focus shift if expanded via keypress #468
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 zotero/zotero#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 zotero/zotero#4069 to be merged and approved by the VPAT reviewers before doing this.