WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Expected behavior for description text of a toggle button


From: Alexander Schmitz
Date: May 20, 2015 2:59PM

> I'm curious: Why isn't the default behavior of the native control
adequate? For usability as well as accessibility, it's best to use native
controls whenever possible.

All of the controls in the form in my example
are exhibiting native behavior they just use different markup. The question
is what is the correct markup / behavior for this particular form layout.
When the control appears as a button type element ( toggle button ).

I updated to add a native un-styled checkbox to show this.
http://jsbin.com/muceye/3/edit?html,css,output hope this clears up any

On Wed, May 20, 2015 at 3:40 PM, Scott González < <EMAIL REMOVED> >

> On Wed, May 20, 2015 at 3:11 PM, Cliff Tyllick < <EMAIL REMOVED> > wrote:
> > Alexander, if I understand your question correctly, the answer is
> > "Neither."
> >
> > When I touch the text, I probably want to swipe up or down, or perhaps
> > zoom in with a two-finger motion. I don't expect a form control to
> toggle,
> > because that isn't what text—even when it's a form label—does.
> >
> That's not true. Labels for checkboxes and radios *do* activate their
> associated controls. This makes forms much more usable because the
> extremely small form controls receive much larger hit areas as a result.
> > > > >