Contact emails
Explainer
Specification
Summary
This proposal adds a switch attribute to <input type="checkbox"> for binary on/off settings. The control reuses the checkbox's checked state, form participation, and label association while exposing it as a switch to assistive technologies. It provides a platform-native
appearance and supports familiar click, keyboard, and touch interactions. Authors can customize the track and thumb using proposed CSS pseudo-elements, with animation supplied by the user agent. The attribute targets common switch use cases. Cases requiring
child content are not supported by the attribute, and a standalone <switch> element is out of scope for this proposal.
Blink component
Web Feature ID
Motivation
Switches are common in settings, preferences, feature controls, and consent interfaces, but the HTML Standard does not currently define a native switch control. Developers instead rely on JavaScript component libraries, visually hidden checkboxes with custom
CSS, or generic elements with role="switch". Depending on the approach, developers may need to recreate accessibility semantics, keyboard handling, state management, or form participation. These approaches can result in inconsistent behavior and accessibility,
fragile implementations, and unnecessary JavaScript costs.
Initial public proposal
Requires code in //chrome?
False
Tracking bug
Estimated milestones
No milestones specified
Link to entry on the Chrome Platform Status