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

Desktop: Accessibility: Fix screen reader doesn't read Goto Anything search results or help button label #10816

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Aug 2, 2024

Summary

This pull request fixes several Goto Anything-related accessibility issues:

  1. Adds information that allows screen readers to read the selected Goto Anything search result when results update and when navigating with the Up/Down arrow keys.
  2. Associates the Goto Anything help text with its input using aria-describedby.
  3. Adds an aria-label to the help button (which was previously unlabelled).
  4. Converts the help button from an anchor to a button. This allows it to be activated by pressing space and fixes an issue where its focus indicator wasn't shown when focused.

See the W3C's page on the Combobox pattern for more information about the aria information used to connect search results to the search input.

Related issue: #10795.

Remaining issues

  • In long lists, there is often empty space where the last on-screen result in Goto Anything should be. If this unrendered result is selected, it won't be read by the screen reader.
  • The notebook path in a search result is read just after reading the title for a note, without any separation or label (tested with VoiceOver on MacOS).
  • At least with VoiceOver, the help text is not the next navigation item after the help button.

Testing plan

Note

The existing automated tests for Goto Anything test: 1) that the dialog can be opened and closed successfully and 2) that it's possible to run the :setTags command from Goto Anything.

MacOS:

  1. Enable VoiceOver.
  2. Open Goto Anything using cmd-p.
  3. Type :.
  4. Verify that VoiceOver reads the first search result and its position.
    • For me, this is Change application layout (toggleLayoutMoveMode), selected, (1 of 40).
  5. Press the Down arrow key.
  6. Verify that VoiceOver reads the second search result and its position.
  7. Hold Down until the last item in Goto Anything is selected.
    • For me, this was "Toggle sidebar (toggleSidebar), selected, (40 of 40)"
  8. Type dup.
  9. Verify that VoiceOver reads "Duplicate (duplicateNote), selected, (1 of 1)".
    • It should not be necessary to navigate with the arrow keys for this to be announced.
  10. Backspace everything and type @
  11. Use the arrow keys to select one of the notebooks in the search results.
  12. Press enter.
  13. Verify that Goto Anything has been closed and that Joplin has moved to the focused notebook.
  14. Open Goto Anything.
  15. Verify that the help text for Goto Anything is read by VoiceOver ("Type a note title or part of its content to...").
  16. Press tab.
  17. Verify that the "help" button is focused and has a visible focus indicator.
  18. Press space.
  19. Verify that the help text is visible.

…s and help text

Adds information that allows screen readers to read the selected Goto
Anything search result when pressing Up/Down and to read help text.
@personalizedrefrigerator personalizedrefrigerator added desktop All desktop platforms accessibility Related to accessibility labels Aug 2, 2024
@laurent22
Copy link
Owner

Some conflicts here

@laurent22 laurent22 merged commit 9f997c2 into laurent22:dev Aug 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Related to accessibility desktop All desktop platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants