- From: Joseph Scheuhammer <clown@alum.mit.edu>
- Date: Wed, 06 Jun 2012 14:20:55 -0400
- To: Cynthia Shelly <cyns@microsoft.com>
- CC: HTML Accessibility Task Force <public-html-a11y@w3.org>, "wai-xtech@w3.org" <wai-xtech@w3.org>, "Sharon Newman (COHEN)" <Sharon.Newman@microsoft.com>, Andi Snow-Weaver <andisnow@us.ibm.com>, David Bolter <dbolter@mozilla.com>
On 12-06-04 8:17 PM, Cynthia Shelly wrote: > > Less clear is this case, where the HTML “required” attribute is not > present. > > <input type=text aria-required=true> > The problem is because of the way boolean attributes work in HTML5. HTML5 doesn't require boolean attributes to equal 'true' or 'false', just that they be present or absent. Quoting HTML5 [1]: > The presence of a boolean attribute on an element represents the true > value, and the absence of the attribute represents the false value. Thus, in order to mark an <input> as not required, authors leave out the @required attribute. > Does “available” mean that the element supports that attribute, or > that the attribute is present in the current instance of markup? I'll take a stance: "available" means that the element supports the attribute. Specifically, <input> elements support @required. In that case, the following is also an author error, since the lack of @required means "optional" here. It's the flip side of your other example where @required is present, and aria-checked = "false": <input type=text aria-required="true"> It looks to me that, in this case, the native HTML5 @required attribute is semantically equivalent to aria-required, and, according to the various specs you cited, it wins. The problem, I think, comes up with HTML4, since it doesn't have a native @required attribute and then the very same markup as above would *not* be an author error: <input type="text" aria-required="true"> Perhaps David has some insight: does FF make a distinction between HTML5 and HTML4 (or XHTML 1.0 for that matter) regarding the use of aria-required? [1] http://dev.w3.org/html5/spec/common-microsyntaxes.html#boolean-attribute -- ;;;;joseph. 'A: After all, it isn't rocket science.' 'K: Right. It's merely computer science.' - J. D. Klaun -
Received on Wednesday, 6 June 2012 18:21:29 UTC