Path: csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Give alert if form checkbox array is empty Date: Wed, 20 Jan 2016 20:39:30 +0100 Organization: PointedEars Software (PES) Lines: 61 Message-ID: <5616093.ohUElf7dUC@PointedEars.de> References: <5888602.Nj0jmESFCg@PointedEars.de> <405a9$569fab1d$11450e97$16733@nntpswitch.blueworldhosting.com> <3964788.uURLdzOTfL@PointedEars.de> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1453318772 32634 eJwFwYEBwDAEBMCVCP8YpyL2H6F3MCpvOEHHYn3qSaYwhKaau6dxRNKGUSMIPHzPo7r2dvz8YRBX (20 Jan 2016 19:39:32 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Wed, 20 Jan 2016 19:39:32 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwYEBwDAEBMCV6D9iHEL2H6F3Ble/QTenPXtYN1bZ0W14TpaKFIFBHIkzW8FCpnR/lx+3FNGcYEik/T58FJ4= Cancel-Lock: sha1:OEN+iRoeoNGipBrD/Jvi35F5thM= X-NNTP-Posting-Host: eJwFwYkBwCAIA8CVeBJIx1HU/UfoHbO8plEs8PFdgHL3AND7mr6G0iAEK0O+xmIGTC07XT/ofg9M Xref: csiph.com comp.lang.javascript:29378 Jon Ribbens wrote: > On 2016-01-20, Thomas 'PointedEars' Lahn wrote: >> Cezary Tomczyk wrote: >>> I am not sure whether using implicitly labels is a good idea. I think >>> there were some problems with screen readers, but I am not quite sure at >>> the moment. >> I would like to see evidence of that. I would understand problems with >> layout engines (like dotted borders around the checkbox on focus), but >> screen readers? > > WCAG 1.0 checkpoint 12.4 says "Associate labels explicitly with their > controls". "Explicitly" probably means "using the 'for' attribute" as > opposed to "implicitly by nesting the control within the label > element", because that's the way the HTML 4.01 spec uses those terms. > It's not entirely clear what the W3C meant when they wrote the > standard, because WCAG 1.0 is a mess. Not only that; it has been succeeded by WCAG 2.0 more than 5 years ago, and ,- | | […] Although it is possible to conform either to WCAG 1.0 or to WCAG 2.0 | (or both), the W3C recommends that new and updated content use WCAG 2.0. | The W3C also recommends that Web accessibility policies reference WCAG | 2.0. > https://www.w3.org/TR/html401/interact/forms.html#edef-LABEL HTML 4.01, too, is no longer the current version of HTML. It has been succeeded by HTML5 more than a year ago: > There was presumably a reason for this rule, Yes, but not only is that assumption not enough for a design decision, is irrelevant now that more recent layout engines are no longer based on HTML 4.01. > On the other hand, WCAG 2.0 Technique H44 describes a way of > conforming to WCAG 2.0 by using the explicit 'for' attribute, > and there is no other technique I can see at a glance which > describes a way of conforming by using nesting instead. On the > other other hand, WCAG 2.0 Failure Technique F68, which is also > relevant, does mention the implicit nesting method. It's not > entirely clear what the W3C meant when they wrote the standard, > because WCAG 2.0 is a mess. I was not of that opinion before, but reading this I have to agree: it is a mess :) So, given these contradictory recommendations regarding accessibility, one should do what I said in the first place: If there is no known problem with nested elements, do not insist on using “for” and “id” attributes instead. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.