Re: ARIA roles added to the a element should be conforming in HTML5.

Nick Fitzsimons On 09-11-11 11.52:

> 2009/11/10 Leif Halvard Silli:
>> I would think that the reason that you shouldn't use a button is because it
>> isn't a  button because it isn't inside a form.
>>
>> Well, it is still a button - even outside a <form>, but a button outside the
>> form element - what use is that? Why doesn't HTML 5 say that it is invalid,
>> like HTML 4 does?
> 
> HTML 4.01 doesn't say that a button outside a form is invalid. In
> section 17.2.1 [1] it explicitly states:
> 
> "The elements used to create controls generally appear inside a FORM
> element, but may also appear outside of a FORM element declaration
> when they are used to build user interfaces."
> 
> [1] <http://www.w3.org/TR/html401/interact/forms.html#h-17.2.1>

Thanks for correcting me. I tested <button> in validator.w3.org 
first, but I now see that I interpreted the result wrongly.

I think, however, that many authors would be quite baffled by a 
message from the HTML 5 validator telling them to use <button> 
instead of a link. Many will not know how to do it, since it 
requires scripting.
-- 
leif halvard silli

Received on Wednesday, 11 November 2009 16:50:50 UTC