Page MenuHomePhabricator

Binary inputs: clearly document guidelines for accessible labels
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

In T334514: ToggleSwitch: consider making the label required, we decided not to make the label required for binary inputs because it would be too limiting to Codex users. Instead, we will provide guidelines and warnings that steer Codex users in the right direction in terms of accessibility.

User Story

As a Codex user, I want to have flexibility in how I choose to label binary inputs while still being guided down the correct path for accessibility requirements.

Acceptance Criteria

For the Checkbox, Radio, and ToggleSwitch components:

  • Add guidelines in the Figma spec that make it clear a semantic label should be provided somewhere.
  • Throw a warning to the developer when the default (label) slot is empty that goes away if aria-label or aria-labelledby attributes are present.
  • Add documentation about these guidelines and the above warning in the docs for each component.
  • Update all examples of ToggleSwitches to show the different kinds of labelling options that conform to the guidelines.

Event Timeline

CCiufo-WMF set the point value for this task to 2.
CCiufo-WMF moved this task from Needs Refinement to Up Next on the Design-System-Team board.
AnneT renamed this task from Better accessibility guardrails for Codex binary input components to Binary inputs: clearly document guidelines for accessible labels.Jun 22 2023, 7:39 PM
CCiufo-WMF triaged this task as Medium priority.Jun 26 2023, 2:31 PM

Change 940996 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] Checkbox, Radio, ToggleSwitch: Warn when input is not labelled

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

Catrope updated the task description. (Show Details)
Catrope added subscribers: AnneT, Catrope.

Moving to design sign-off for the Figma spec change, once that is done this can move to Pending Release.

Change 940996 merged by jenkins-bot:

[design/codex@main] Checkbox, Radio, ToggleSwitch: Warn when input is not labelled

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

Included guidelines explaining that label will be recommended in ToggleSwitch component, and required in both Checkbox and Radio.

Moving task to Pending Release.

Change 944353 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/core@master] Update Codex from v0.15.0 to v0.16.1

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

Change 944353 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.15.0 to v0.16.1

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