Page MenuHomePhabricator

Each sidebar element should have a clear label, role, state and description/instructions
Closed, ResolvedPublic5 Estimated Story Points

Description

Current issues

Many elements are missing information about role, state and how the user can interact with it using keyboard navigation.

Requirements

Search field

  • Role of search should be clearly defined, possibly done with landmark in T291281?
  • Placeholder text is not sufficient to explain what is being searched. For screen readers, the label should be "Parameter search for $Template name"

Parameter list

  • When entire list is focused, it should be announced as "Parameters in $Template name".
  • Role should make clear what the list is and how to interact with this. Currently announced as list box. This should be correct and imply navigation by arrow keys, so this instruction does not need to announced. (Check if multi-select a better fit?)
  • Instructions for interacting with checkboxes within the list are announced using aria-describedby: "Press Space to add or remove parameters. Press Enter to add a parameter and immediately edit its value. When a parameter is already selected, press Enter to edit the value."

Checkboxes

  • Checkboxes have the checkbox role Have the options role see comment below
  • Checkbox state is announced (currently only unselected are announced but not selected)

Note: Required parameters are represented as disabled checkboxes in the sidebar. Make sure screenreader users can understand this. Possibly remove the checkbox. Possibly make use of OO.ui.mixin.RequiredElement (sets aria-required, see https://gerrit.wikimedia.org/r/711145 ). From https://stackoverflow.com/q/34300154#comment85584639_34300154: //"For checkboxes, regardless if checked or not a value is passed to through the form. If you want to communicate that the user must check a checkbox to proceed / submit, then such a message should be associated through us of the aria-describedby attribute pointing to a text container (via that container's ID attribute)."

~~~For multi-part template content only:~~~
Wikitext element

  • Label should be announced and instructions should be available (possibly under aria-describedby so that users can choose if they want to hear the instructions instead of it repeating every time)
    • When in focus and unselected, "Press Space to select the wikitext element. Press Enter to select and edit the wikitext."
    • When in focus and selected, "Press Ctrl+Del to delete the wikitext element. Press Ctrl+Shift+Arrows to move the element up or down."

Template names

  • Label should be announced and instructions should be available (possibly under aria-describedby so that users can choose if they want to hear the instructions instead of it repeating every time)
    • When in focus and unselected, "Press Space to select the template."
    • When in focus and selected, "Press Ctrl+Del to delete the template, its parameters and their values. Press Ctrl+Shift+Arrows to move the template up or down."

Event Timeline

Notes from g doc:

  • Thiemo: One possible solution is to forget about the checkboxes entirely, but read this as a multi-select list (which it actually is).
  • Adam: I like this suggestion.
awight set the point value for this task to 5.Sep 29 2021, 1:25 PM
ECohen_WMDE renamed this task from Each element should have a clear label, role, state and description/instructions to Each sidebar element should have a clear label, role, state and description/instructions.Sep 29 2021, 1:26 PM

Change 732637 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Improve a11y support for sidebar search

https://gerrit.wikimedia.org/r/732637

Change 732645 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Add a11y label to sidebar parameter selection

https://gerrit.wikimedia.org/r/732645

  • Placeholder text is not sufficient to explain what is being searched. For screen readers, the label should be "Parameter search, $Template name"
  • When entire list is focused, it should be announced as "Parameters, $Template name".

I wonder if we should be more verbose in these labels, it could get confusing if the template name is really short or just some symbols. On the other hand it might be annoying for users that get the context already. I guess the extreme example here is the template !! there the reader just reads "Parameter search exclamation mark" or "Parameters exclamation mark".

Most verbose would be something like "Parameters, Template: $Template name" or shorter "Parameters, for $Template name".

Change 732706 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Set aria-multiselect on OutlineParameterSelectWidget

https://gerrit.wikimedia.org/r/732706

Change 732707 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] Use cheaper jQuery constructor for minor template param label

https://gerrit.wikimedia.org/r/732707

  • Checkbox state is announced (currently only unselected are announced but not selected)

With NVDA and ORCA this does not seem to be the case. The state is read out correctly. Also the needed ARIA attributes to promote the states are in place.

"Parameters, for $Template name".

Good point! Maybe it's a bit clearer just by adding in one word. Will go through and update the task description.

Also the needed ARIA attributes to promote the states are in place.

I feel like if this is the case then it must have been a VoiceOver bug and there is nothing to change here?

Change 732920 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[oojs/ui@master] Mark multiselect SelectWidget with aria-multiselectable=\"true\"

https://gerrit.wikimedia.org/r/732920

Change 732706 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Set aria-multiselect on OutlineParameterSelectWidget

https://gerrit.wikimedia.org/r/732706

Change 732637 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Add title to sidebar search

https://gerrit.wikimedia.org/r/732637

Change 732707 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Use cheaper jQuery constructor for minor template param label

https://gerrit.wikimedia.org/r/732707

Change 732645 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Add a11y label to sidebar parameter selection

https://gerrit.wikimedia.org/r/732645

Change 732982 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Remove button role from sidebar headers

https://gerrit.wikimedia.org/r/732982

Change 732982 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Use <span> for the outline part headers

https://gerrit.wikimedia.org/r/732982

Change 734270 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Add ARIA descriptions for parameter selection interaction

https://gerrit.wikimedia.org/r/734270

@ECohen_WMDE From the comment on the patch regarding the template selection:

It feels like the description should be applied to the entire list, not to each element individually. In other words: I don't think it makes sense to have the screenreader read the description over and over again for each element. I would expect it once when I enter the list of parameters. This implies coming up with a text that applies both to unselected and selected parameters. For example:

"press space to add or remove parameters, press enter to add a parameter and change it's value".

And I got another question from the implementation of the Wikitext and Template element regarding the instructions to move and delete.

~~~For multi-part template content only:~~~
Wikitext element

Label should be announced and instructions should be available (possibly under aria-describedby so that users can choose if they want to hear the instructions instead of it repeating every time)
    When in focus and unselected, "Press Spacebar to select wikitext element. Press Enter to select and edit the wikitext."
    When in focus and selected, "Press Control-Delete to delete the wikitext. Press Control-Shift-Arrow to move element up or down."

Template names

Label should be announced and instructions should be available (possibly under aria-describedby so that users can choose if they want to hear the instructions instead of it repeating every time)
    When in focus and unselected, "Press Spacebar to select entire template."
    When in focus and selected, "Press Control-Delete to delete the template, its parameters and their values. Press Control-Shift-Arrow to move template up or down."

The sidebar is currently build in a way where the screen reader does not really notice if the Wikitext and Template elements are being selected or not. Meaning, the logic is there, and of cause does the browser notice the selection and makes it visible, but the screen reader does neither take note of that change nor the current state they are in.

So if we're focusing for example the a template title in the sidebar, the screen reader reads the description how to enable it. And...

  • a) ...when pressing Space, the template gets selected but the screen reader will read nothing to make that change "hear-able".
  • b) ...the screen reader will also not read the "new" instructions about how to move the element after it was selected. These would only be noticed, if the user moves the focus away and comes back to the element.

I might be able to fix a) but I'm not sure about b). So as a workaround for b) it would be good to have instructions, that can be read in either case ( selected or not ) and still make sense.

Latest update, I just found an relatively easy way to at least let the screen reader realize if a header is selected or not. But we would still need that one text that fit them all I guess.

Change 735306 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Set selected status to sidebar elements

https://gerrit.wikimedia.org/r/735306

Change 735306 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Set selected status to sidebar elements

https://gerrit.wikimedia.org/r/735306

Change 735576 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Add ARIA descriptions to sidebar widgets

https://gerrit.wikimedia.org/r/735576

Change 735576 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Add ARIA descriptions to sidebar widgets

https://gerrit.wikimedia.org/r/735576

Change 735595 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Add ARIA descriptions for parameter selection interaction

https://gerrit.wikimedia.org/r/735595

Change 734270 abandoned by WMDE-Fisch:

[mediawiki/extensions/VisualEditor@master] Add ARIA descriptions for parameter selection interaction

Reason:

In favor of I8ce5723c14673658fabf136087e317a92fd5feaa

https://gerrit.wikimedia.org/r/734270

WMDE-Fisch updated the task description. (Show Details)

Note the minor adjustments in the text of the sidebar element description headers.

Note the minor adjustments in the text of the sidebar element description headers.

Screen Shot 2021-09-17 at 10.43.15.png (185×659 px, 81 KB)

Wondering what the reason for switching to "Ctrl" from "Control" is? I was basing it on this existing example from when I was testing with VoiceOver. Does Ctrl sound correct when being read out loud? Same question with "Del" and "Delete." I'm fine with following conventions here, just want to make sure it'll be understandable.

It's always Ctrl in VE:

Screenshot from 2021-10-29 17-52-38.png (139×293 px, 6 KB)

Screenshot from 2021-10-29 17-52-30.png (180×256 px, 9 KB)

When a keyboard shortcut is mentioned in a title tooltip it's also Ctrl. The assumption is that screenreader users have seen this before in MediaWiki and other software and know that Ctrl refers to the key. In contrast to the word "control" which could mean something else.

Change 735738 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] [PoC] Support ARIA descriptions on parameter selection

https://gerrit.wikimedia.org/r/735738

Change 735595 abandoned by WMDE-Fisch:

[mediawiki/extensions/VisualEditor@master] Add ARIA descriptions for parameter selection interaction

Reason:

In favor of I1b3d40400d539f851f13719e16ced200968a7f92

https://gerrit.wikimedia.org/r/735595

Change 735738 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Introducing a mixin for ARIA descriptions on parameter selection

https://gerrit.wikimedia.org/r/735738

Change 732920 merged by jenkins-bot:

[oojs/ui@master] Mark multiselect SelectWidget with aria-multiselectable=\"true\"

https://gerrit.wikimedia.org/r/732920

Change 736621 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update OOUI to v0.42.1

https://gerrit.wikimedia.org/r/736621

Change 736621 merged by jenkins-bot:

[mediawiki/core@master] Update OOUI to v0.42.1

https://gerrit.wikimedia.org/r/736621

Change 736986 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Remove local aria-multiselectable

https://gerrit.wikimedia.org/r/736986

Change 736986 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Remove local aria-multiselectable

https://gerrit.wikimedia.org/r/736986

thiemowmde moved this task from Demo to Done on the WMDE-TechWish-Sprint-2021-10-27 board.

We identified a follow-up in today's demo time, see T295353.