HTML and CSS Reference
In-Depth Information
Listing 1.4. ARIA combobox example from www.w3.org/TR/wai-aria/roles#combobox
The HTML5 specification explicitly states that you may use the ARIA role and aria-*
attributes on HTML elements as described in the ARIA specification; this wasn't allowed
in HTML4. HTML5 also defines a set of default ARIA roles that apply to certain HTML
elements. For example, it's implied that a checkbox <input> element has an ARIA role
of checkbox , and you shouldn't explicitly use role or aria-* attributes that differ
from those implied in these cases.
You'll also find HTML elements where the native semantics can be modified so that they
behave differently. For example, you might create an <a> element that behaves like a but-
ton and use it to submit a form after performing some validation. The HTML5 specifica-
tion defines a list of valid semantics for these elements. When you use the <a> element
to create a hyperlink, it assumes the link role by default, and if this is modified, its role
can only be changed to one of the following: button , checkbox , menuitem , menu-
itemcheckbox , menuitemradio , tab , or treeitem .
For a complete list of the default, implied ARIA semantics, and the restrictions on how you
can modify the semantics of certain elements, see the WAI-ARIA section of the HTML5
specification at http://mng.bz/6hb2 .
1.1.4. Enabling support in Internet Explorer versions 6 to 8
A subject you may wonder about as you consider HTML5 elements is compatibility with
older browsers, and rightly so. Each new version of HTML brings with it new elements
that you can use in your documents. HTML5 is no different. Most modern browsers are
more than capable of rendering these elements, even versions that don't specifically sup-
port them. The way that most browsers handle unrecognized elements is by rendering them
Search WWH ::




Custom Search