Page MenuHomePhabricator

Results of EntityLookup are not announced to screen reader
Closed, ResolvedPublic8 Estimated Story Points

Description

As a user, I would like to be able to use common screen reader technologies, when accessing the Special:NewLexemePage, and selecting options from the Lexical Category and Lexeme Language Fields, so that options are correctly read to me.

Acceptance Criteria

When using common screen reader technologies (NVDA, JAWS, VoiceOver, Orca):

  • The lexical category, and lexeme language fields are announced correctly: as an options list with an autocomplete
  • When Navigating through the options list, the options are annouced and are mentioned as selectable

Technical Details

ComponentIssuePossible solutions
LookupWhen the lookup component is focused, screen readers (VoiceOver) currently announce: "You are currently on a text field. To enter text in this field, type", which is incorrect. Users should be aware that they need to type in order to get a list of choices.1. Apply the right role attribute (combobox?) to the component, use aria-autocomplete="list", aria-haspopup="listbox", aria-owns="#IDREF", aria-activedescendant="IDREF" and aria-expanded (true/false) or so the right component and instructions are announced to users. 2. Use live regions to let users know how many results are available. (See WAI-ARIA example)
OptionsMenu(In VoiceOver) The content of the menu is announced as “text”: the existence of selectable options and how to navigate to them or select them is not stated. Options are not announced by screen readers when users navigate through them (see Details below)Apply role="listbox" and an aria-label to the menu component, and the role="option" and aria-selected="true"(when applicable) to the menu options. (See WAI-ARIA example)

Details:

  • Using NVDA screen reader while typing into the EntityLookup, there is no announcement when new results are available
  • it appears that pressing the down-arrow key with NVDA doesn't let the user select the options?
  • when using JAWS, selecting options with the arrow keys seemed to have worked
  • VoiceOver on MacOS does not announce the content of the Lookup menu items

Event Timeline

Sarai-WMDE renamed this task from results of EntityLookup are not announced to screen reader to Results of EntityLookup are not announced to screen reader.EditedApr 28 2022, 11:08 AM
Sarai-WMDE updated the task description. (Show Details)

Added the tags 'Wikidata Lexicographical data' and ‘Special:NewLexeme revival‘ to this ticket because this accessibility issue would now affect the users of the new New Lexeme page. Att @Lydia_Pintscher

Task Breakdown Notes:

  • The change for this will have to happen on the lookup component in WiKit.
  • The general goal is to make sure our code is written in a way that is WCAG compliant, See technical details.
  • The small differences between screen readers is not the focus of this task, however the WiKit code should be compliant with the standards, so that when SR techs catch up, we will be readily accessible.
  • On Ubuntu, the Orca screen reader is already bundled with gnome. To learn how to use it, go to the manual in the operating system and search for "Orca". Also see:

Potential plan of Action:

  1. In WiKit, add the mentioned attributes to the lookup component, according to the table above
  2. Test locally with orca on the local wikit storybook
  3. After the change is merged to WiKit's master and next branches, create a pre-release to incorporate the new code in Special:NewLexemeAlpha

Note: in Orca, the screen reader says: "<Whatever-is-on-the-label> entry". The options are not announced.

Question: What should the text be in this part of the description of the project.

aria-label to the menu component.

I was tempted to hardcode the word "Menu" (aria-label="Menu") and the label but what about the translations to other languages?

Note: i have chosen the role="menu" because it is more appropriate for this component. I have adjusted the rest of the aria attributes to match the menu. (role="menuitem" instead of role="option" as suggested in the ticket.)

Question: What should the text be in this part of the description of the project.

aria-label to the menu component.

I was tempted to hardcode the word "Menu" (aria-label="Menu") and the label but what about the translations to other languages?

Note: i have chosen the role="menu" because it is more appropriate for this component. I have adjusted the rest of the aria attributes to match the menu. (role="menuitem" instead of role="option" as suggested in the ticket.) I have also appended the description to the aria-label of the menuitem.

Since in Orca the screen reader text is different I am not sure if the A/C is met. Will put up for a pre-review.

UPDATE:

role="listbox" has been used in the end for adjusting better for the requirements of the tickets as originally suggested in the ticket description.

@Michael @Sarai-WMDE Would one of you be able to verify this? I currently don't have the necessary setup.

Hi @Lydia_Pintscher! I provided my findings and feedback in the relevant PR after testing the changes locally using VoiceOver (in MacOS, of course).

UPDATE:

  • No-results-found issue will be tackled in a different task. @Michael
  • there is a new commit in PR 587 to address the 'limited support' not being listed / listed incorrectly. Will be handed over to review again once the github CI cache issue has been fixed by the actions/cache authors. issue has been mitigated

Task Breakdown Notes II:

  • We decided that as long as the code is WCAG compliant, we can resolve this task, while creating additional bug tasks to tackle reader specific issues, stemming from differences between the various screen reader implementations (i.e. Special task for VoiceOver on Mac, to be prioritized and handled separately when we are able to debug it).

As far as I can see this is ready, the remaining issue of making sure that the error messages have something like role="alert" to them and something like aria-invalid in some appropriate cases will go to a separate task