WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: WCAG2: Form fields and labels

for

From: Lynn Holdsworth
Date: Feb 5, 2015 9:53AM


Thanks everyone. I find these discussions invaluable.

On 05/02/2015, Birkir R. Gunnarsson < <EMAIL REMOVED> > wrote:
> Sorry, clicked "send" by mistake.
> When I run this construct through a validator
> https://html5.validator.nu/
> I get the error
> "Error: The for attribute of the label element must refer to a form
> control."
> I have really not used 4.1.1 much, so I absolutely agree, I would call
> this under 1.3.1, but I thought that 4.1.1 could be used if the html
> fails validation, but I culd very easily be wrong on that point.
> The spec admittedly says:
> "Parsing: In content implemented using markup languages, elements have
> complete start and end tags, elements are nested according to their
> specifications, elements do not contain duplicate attributes, and any
> IDs are unique, except where the specifications allow these features.
> (Level A) "
> So while multiple IDs are clearly 4.1.1 violations, missing IDs are
> not mentioned.
> Thanks
> -Birkir
>
>
> On 2/5/15, Birkir R. Gunnarsson < <EMAIL REMOVED> > wrote:
>> Greetings
>>
>> Andrew, quick question on 4.1.1
>> I thought it could possibly fail 4.1.1 because the label tag
>> references a non-existent ID attribute (assuming the typo is such as
>> the for=ID value of the label tag points to an ID that does not exist
>> on the page).
>>
>>
>> On 2/5/15, Andrew Kirkpatrick < <EMAIL REMOVED> > wrote:
>>> Thanks both. I think I will fail it under 4.1.2 as well as 1.3.1 and
>>> 4.1.1.
>>>
>>> I disagree that this would fail 4.1.1. The content can be parsed
>>> correctly
>>> as written, it is just that there is an error in what is written.
>>> AWK
>>> >>> >>> >>>
>>
>>
>> --
>> Work hard. Have fun. Make history.
>>
>
>
> --
> Work hard. Have fun. Make history.
> > > >