ACTION-2261: Look at https://github.com/whatwg/html/issues/5625 requesting 'toggle'/'switch' attribute for checkbox inputs (poc inside!)

Look at https://github.com/whatwg/html/issues/5625 requesting 'toggle'/'switch' attribute for checkbox inputs (poc inside!)

State:
open
Person:
Becky Gibson
Due on:
June 17, 2020
Created on:
June 10, 2020
Related emails:
  1. Minutes of June 17 meeting (from becky@knowbility.org on 2020-06-17)
  2. APA Minutes 2020-06-10 (from zimmermann@accesstechnologiesgroup.com on 2020-06-10)
  3. apa-ACTION-2261: Look at https://github.com/whatwg/html/issues/5625 requesting 'toggle'/'switch' attribute for checkbox inputs (poc inside!) (from sysbot+tracker@w3.org on 2020-06-10)

Related notes:

summary: native mobile UIs have a switch element, HTML does not. Devs want web apps rendering on mobile to have "switch" element and have to craft via JS. Want to make role match visual appearance. ARIA has a role=switch (but it has no indeterminant/mixed value like checkbox.
One proposal was to add a switch attribute to checkbox: <input type="checkbox" switch>.
June, 2019 - google proposal to add a new switch element via Std JS control: https://github.com/tkent-google/std-switch/blob/master/README.md and demo: https://tkent-google.github.io/std-switch/demo.html.
A toggle switch control element w3ctag/design-reviews#384 was requested and closed.

Becky Gibson, 17 Jun 2020, 14:20:15

Note that https://github.com/whatwg/html/issues/5625 was closed. Discussion continues at https://github.com/whatwg/html/issues/4180

Becky Gibson, 17 Jun 2020, 14:22:51

There has been no recent discussion. Someone did provide an example implementation. ARIA has a switch that maps to "toggle" in most a11y apis. Argument is that web devs shouldn't have to recreate this over and over. A type="checkbox switch" has been suggested to indicate the styling. Concerns have been raised about how to implement and allow styling. Advantages: match native mobile UI; larger hit target than checkbox. Disadvantages: expression of on/off not as straightforward as checkbox; indeterminate states not clear (toggle in middle position?). Not sure we need to weigh in from a strictly a11y point of view - probably biggest argument is that AIRA includes switch.

Becky Gibson, 23 Sep 2020, 16:46:50

Display change log.


Janina Sajka <janina@rednote.net>, Matthew Atkinson <m.atkinson@samsung.com>, Chairs, Ruoxi Ran <ran@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 2261.html,v 1.2 2023/12/11 11:50:22 dmontalvo Exp $