Page MenuHomePhabricator

User links: Improve "Logged out editors" link text for assistive tech
Closed, ResolvedPublic2 Estimated Story Points

Description

Description

"Pages for logged out editors (learn more)" reads out the following with VO in Chrome and Safari.

  1. "Pages for logged out editors ("
  2. "link, learn more"
  3. ")"

Video: https://jmp.sh/11WcFgz

This is a suboptimal experience for users with assistive tech because:

  • The link text is not descriptive on its own. https://www.w3.org/WAI/WCAG21/Understanding/link-purpose-in-context.html
  • The parentheses are distracting, and make it harder to understand the text.
  • The "Pages for logged out editors" label is not associated with the "Talk" and "Contribution" links, which means that context would be lost if the user is navigating by links.

Developer notes

The following changes could fix the issues above:

  1. Use pseudo element for the parentheses
  2. Override the default "learn more" link label with aria-label
  3. Associate the "Talk" and "Contribution" links with the "Pages for logged out editors" by using the aria-describedby.
<div class="vector-user-menu-anon-editor">
	<p>
		Pages for logged out editors
		<a href="/wiki/Help:Introduction" aria-label="Learn more about anonymous editing">
                    :before
                    <span>learn more</span>
                    :after
                </a>
	</p>
</div>
<ul class="vector-menu-content-list" style="margin-right: initial;">
	<li id="pt-anontalk">
		<a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [ctrl-option-n]" accesskey="n"><span>Talk</span>
		</a>
	</li>
	<li id="pt-anoncontribs">
		<a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [ctrl-option-y]" accesskey="y"><span>Contributions</span>
		</a>
	</li>
</ul>

CSS generated content is read-out to screenreaders.
In order to remove the verbose parentheses at least for Chromium based browsers we need to add alternative content for assistive technology:

// Support: Firefox, Safari. Backwards-compatible generated content.
content: '@{msg-parentheses-start}';
// Support: Chromium based browsers. Alternative technology supporting generated content.
content: '@{msg-parentheses-start}' / '';

QA Results - Beta

ACStatusDetails
1T288293#7332744

QA Results - Prod

ACStatusDetails
1T288293#7339269

Event Timeline

Jdlrobson triaged this task as Medium priority.Aug 11 2021, 2:16 PM

Rather than wrapping the parentheses in a span <span aria-hidden="true">(</span> we might want to consider the use of CSS pseudo-elements for this. Note there is a message "parentheses" that can be used for this as they will be subject to translation. https://github.com/wikimedia/mediawiki/blob/master/resources/Resources.php#L1879 is a good example in core of how this would work.

Change 714830 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Improve readability of anon user menu for screenreaders

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

I updated the description to remove the AC of linking the label and the links with aria-describedby out of the concern of making the screen reader output more verbose. Considering the label is read out prior to "Talk" and "Contribution", the current behavior is likely acceptable.

bwang removed bwang as the assignee of this task.Aug 26 2021, 7:02 PM
bwang assigned this task to Jdlrobson.

A few notes:

  • Double exposing the label message seems unnecessary. For better context the label could be wrapped in an h4 (as Personal tools itself carries an h3)
  • “Pages for logged out editors” and “Learn more about anonymous editing” in combination is confusing to me. Are these logged out editors now or anonymous editors? It would help to consolidate on one description.
  • Putting brackets into generated content is advisable. But screenreader support is pretty good for CSS generated content nowadays, should the brackets be exposed?
Jdlrobson reassigned this task from Edtadros to bwang.
Jdlrobson added a subscriber: Edtadros.

How do we want to QA this? Is this something Edward can do or does it need a developer? If the former let's add QA notes. If not let's verify the fix and move to sign off.

Change 714830 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Improve readability of anon user menu for screenreaders

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

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

✅ AC1: Screen reader should not read out parentheses in the logged out user links menu.

Screen Recording 2021-09-03 at 8.39.03 PM.mov.gif (280×962 px, 172 KB)

Test Result - PROD

Status: ✅ PASS
Environment: enwiki
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

✅ AC1: Screen reader should not read out parentheses in the logged out user links menu.

Screen Recording 2021-09-08 at 6.34.42 AM.mov.gif (400×1 px, 97 KB)

Edtadros updated the task description. (Show Details)