Page MenuHomePhabricator

ToggleSwitch: Consider on/off labels
Closed, DuplicatePublic

Description

Current designs for ToggleSwitch include a label on the "off" side of the switch.

However, sometimes it would be helpful to have separate labels for the "off" side and the "on" side, plus a label for the switch itself. Consider the controls for configurable demos on the Codex docs site:

Button demo, with disabled prop turned off

Screen Shot 2022-02-22 at 12.00.26 PM.png (790×1 px, 66 KB)

Button demo, with disabled prop turned on

Screen Shot 2022-02-22 at 12.00.31 PM.png (812×1 px, 67 KB)


We should consider how we might add on/off labels to this use case in a way that is semantic and accessible, and how we might enable this within the ToggleSwitch component itself for other use cases.

Event Timeline

Volker_E renamed this task from Consider on/off labels for ToggleSwitch to ToggleSwitch: Consider on/off labels.Jun 21 2022, 8:16 AM
Volker_E added a project: Accessibility.