Use when
- A single setting, feature, preference, or hardware-like control has two clear states.
- The setting can take effect immediately or can clearly show a short pending state.
- The change is reversible and low risk.
Present one stable label with a binary switch state, immediate reversible application, visible state text when helpful, and explicit pending, unavailable, disabled, or read-only states when the setting cannot simply flip.
Users need to turn one setting, feature, preference, or hardware-like option on or off and understand whether the change has taken effect.
The full lab is intentionally loaded on request. That keeps this reading page fast while preserving the strong and weak states, keyboard checks, and failure scenarios.
The controlled item has clear on/off logic and the label can describe the same object in both states.
Present one stable label with a binary switch state, immediate reversible application, visible state text when helpful, and explicit pending, unavailable, disabled, or read-only states when the setting cannot simply flip.
Off state.
The switch looks on while the service is still offline.
Use role switch with aria-checked or a native checkbox implementation that exposes the checked state.
W3C Web Accessibility Initiative - checked
APG switch guidance defines binary on/off semantics, stable labels, accessible names, aria-checked state, and keyboard toggling expectations.
IBM Carbon Design System - checked
Carbon toggle guidance supports immediate reversible binary setting changes and documents on, off, focus, disabled, read-only, skeleton, label, state text, and click target behavior.
GNOME - checked
GNOME switch guidance limits switches to clear on/off features, settings, or hardware and documents delayed effect and unavailable-state handling.
Source trail checked: