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

Reader: Annotations colors aren't accessible via keyboard #4681

Open
dstillman opened this issue Sep 11, 2024 · 2 comments · May be fixed by zotero/reader#139
Open

Reader: Annotations colors aren't accessible via keyboard #4681

dstillman opened this issue Sep 11, 2024 · 2 comments · May be fixed by zotero/reader#139

Comments

@dstillman
Copy link
Member

https://forums.zotero.org/discussion/117800/zotero-7-suggestion-bring-back-toggling-context-color-menu-options-via-keyboard

Both typing and arrow keys

@abaevbog
Copy link
Contributor

abaevbog commented Sep 13, 2024

Hm, yeah. It is seemingly not possible to move into the context menu via keyboard at all ... It's strange because there were some issues with the options from the context menu (e.g. Edit Page Number) that were covered by the VPAT review and that we fixed. But issue of navigating the context menu to get to those options wasn't brought up. And it is not a recent issue as I never updated the stable version so I was on 7.0 and it was still the case there. Odd how it got missed! Potentially because of screen reader's virtual cursors that handled it.

@abaevbog
Copy link
Contributor

Another strange behavior I noticed while working on this to record: annotations can become impossible to select via keyboard if the context menu is closed by clicking outside of it as opposed to clicking Escape.

  1. Tab onto "more" button of an annotation in the sidebar
  2. Press Space to open up context menu
  3. Click onto the reader content to close the menu
  4. Press Shift-Tab twice to focus "Search Annotations" input
  5. Press Tab again
  6. Notice the outline around the annotation box does not appear again, though it should. The focus is present on the annotation box though.
  7. Tab again - the focus will jump to the tags at the bottom of the sidebar, instead of going inside of the annotation box.

abaevbog added a commit to abaevbog/reader that referenced this issue Sep 13, 2024
- add tabstop to contextMenu, so navigation between
buttons within it is handled by focusManager
- when context menu is opened, focus the first button
from contextMenu so that the next keypress interacts
with menu items
- when Escape keypress is being handled and contextmenu
is open, just call reader.closeContextMenu to close it
and let focus go back to previously focused element.
- add keydown listener to context-menu to navigate it
by typing characters on the keyboard. After something
is typed, find buttons with text that begins with
the input. If there is only one match, it is clicked.
If there are multiple, the first one is focused.
The input counter is reset after 3 seconds of not typing.

Fixes: zotero/zotero#4681
@abaevbog abaevbog linked a pull request Sep 13, 2024 that will close this issue
abaevbog added a commit to abaevbog/reader that referenced this issue Sep 30, 2024
- add tabstop to contextMenu, so navigation between
buttons within it is handled by focusManager
- when context menu is opened, focus the first button
from contextMenu so that the next keypress interacts
with menu items
- when Escape keypress is being handled and contextmenu
is open, just call reader.closeContextMenu to close it
and let focus go back to previously focused element.
- add keydown listener to context-menu to navigate it
by typing characters on the keyboard. After something
is typed, find buttons with text that begins with
the input. If there is only one match, it is clicked.
If there are multiple, the first one is focused.
The input counter is reset after 3 seconds of not typing.

Fixes: zotero/zotero#4681
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants