Page MenuHomePhabricator

Add label and title attribute/tooltip to full-screen toggle button
Closed, ResolvedPublic2 Estimated Story Points

Description

Description

We recently added a full-width toggle button for Vector 2022 (T319449). The toggle button needs an accessible label to fix the following accessibility error.

Screen Shot 2022-11-18 at 11.51.05 AM.png (1×3 px, 430 KB)

To better help people understand what the button does we should also add a title attribute to it, so that when people hover over it they will get more information.

Suggested text for the label and title attribute

  • "Make content full-width"
  • "Limit content width"

image.png (1×2 px, 518 KB)

AC

  • Reading the limited width toggle button on a screenreader should read out text
  • Hovering over the limited width toggle button should show a tooltip with text

QA Results - Beta|Prod

ACStatusDetails
1T323625#8515552
2T323625#8515552

QA Results - Beta|Prod

ACStatusDetails
1T323625#8547540
2T323625#8547540

Event Timeline

bwang renamed this task from Add title attribute/tooltip to full-screen toggle button to Add label and title attribute/tooltip to full-screen toggle button.Nov 22 2022, 5:16 PM
bwang updated the task description. (Show Details)
Jdlrobson set the point value for this task to 1.Nov 23 2022, 4:55 PM
ovasileva renamed this task from Add label and title attribute/tooltip to full-screen toggle button to [S] Add label and title attribute/tooltip to full-screen toggle button.Nov 28 2022, 6:32 PM
ovasileva raised the priority of this task from Medium to High.Dec 9 2022, 3:50 PM

Reading the limited width toggle button on a screenreader should read out text

I'm guessing this will be done with an extra element that is only visible to screenreaders. If so, I'm wondering if it makes sense to refactor the button to be server rendered instead of client-side rendered? Because the button is rendered inside the viewport, possible benefits include "last visual change", speed index, and perceived load time improvements

@bwang do screenreaders need this to be accessible?

Change 875426 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Add label and title attribute/tooltip to full-screen toggle button

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

@bwang do screenreaders need this to be accessible?

I do not think this should be accessible to screenreaders. Is toggling the limited width toggle have any influence on the DOM structure or accessibility tree. If not (what I suppose) it would be better to fully hide (aria-hidden) the toggle.

Thanks for confirming. That was what I was thinking.

Change 875426 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Add label and title attribute/tooltip to full-screen toggle button

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

Test Result - Beta

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

Test Artifact(s):

QA Steps

✅ AC1: Reading the limited width toggle button on a screenreader should read out text

Screen Recording 2023-01-10 at 8.18.25 PM.mov.gif (1×1 px, 1 MB)

✅ AC2: Hovering over the limited width toggle button should show a tooltip with text

Screenshot 2023-01-10 at 8.19.50 PM.png (106×236 px, 5 KB)

Screenshot 2023-01-10 at 8.19.40 PM.png (195×328 px, 7 KB)

Jdlrobson renamed this task from [S] Add label and title attribute/tooltip to full-screen toggle button to Add label and title attribute/tooltip to full-screen toggle button.Jan 17 2023, 5:51 PM
Jdlrobson changed the point value for this task from 1 to 2.
Edtadros subscribed.

Test Result - Prod

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

Test Artifact(s):

QA Steps

✅ AC1: Reading the limited width toggle button on a screenreader should read out text

Screen Recording 2023-01-22 at 8.03.00 PM.mov.gif (700×1 px, 792 KB)

✅ AC2: Hovering over the limited width toggle button should show a tooltip with text

Screenshot 2023-01-22 at 8.04.22 PM.png (169×343 px, 6 KB)

Screenshot 2023-01-22 at 8.04.13 PM.png (207×374 px, 7 KB)

@bwang do screenreaders need this to be accessible?

I do not think this should be accessible to screenreaders. Is toggling the limited width toggle have any influence on the DOM structure or accessibility tree. If not (what I suppose) it would be better to fully hide (aria-hidden) the toggle.

@Volker_E @Jdlrobson
Sorry I didnt see this comment before, and I think this passed QA when it shouldn't have. AC1: Reading the limited width toggle button on a screenreader should read out text isnt possible if the toggle has aria-hidden.

I dont think the limited width toggle has much utility to screenreader users, but I dont think it should be excluded from the DOM either. I believe this violates guidelines about using 'aria-hidden' on an interactive/focusable element (https://www.w3.org/TR/aria-in-html/#4thrule).
I think of this similarly to the pinnable elements or any other feature relating to UI customization, the feature doesnt primarily benefit screenreader users, but should be usable by them if they choose. For example, its possible to have a use case (albeit extremely unlikely) where a person with poor vision (not blind) using a screenreader that wants to use the toggle. We do hide features in certain cases like the sticky header, where all the content is repeated and already otherwise accessible, but that doesnt apply here.

Shall we create a new ticket to follow up?