What values ​​can an HTML5 / XHTML role attribute have?

I was wondering what values ​​are valid in the HTML5 / XHTML role attribute?

+75
html5
Nov 13 2018-10-11T00:
source share
4 answers

The rules are pretty complicated. See Tables at http://www.w3.org/html/wg/drafts/html/master/dom.html#wai-aria

+44
Nov 13 '10 at 1:12
source share

It seems that in HTML5, the content of the role attribute is specified as the WIA-ARIA attribute. See, In particular, the last paragraph of section 3.2.3, Global Attributes , which states:

To enable assistive technology products to display a finer interface than is possible with HTML elements and attributes, you can specify a set of annotations for assistive technology products (ARIA role and aria- * attributes).

The role attribute is further described in detail in section section 3.2.7 "WAI-ARIA" , and provides, apparently, a normative table of semantics and values ​​for the attribute for each element.

Note. Links to specific sections of the HTML5 specification above point to the “latest published version” of the HTML5 Technical Report at http://www.w3.org/TR/html5/ . Perhaps a more current version of the editor will appear. TR will contact him on the cover page of the document. As you update the specification or move to a new adoption phase, these links may break and need to be updated.

+11
Dec 10 '11 at 16:25
source share

Here is a list of tags that are considered valid for HTML5 / XHTML: http://www.w3.org/1999/xhtml/vocab/#XHTMLRoleVocabulary

+8
Sep 06 2018-11-11T00:
source share

Here are the valid roles based on HTML 5.2 ...

  • alert
  • alertdialog
  • Appendix
  • article
  • banner
  • button
  • cells
  • check box
  • Columnheader
  • dropdown
  • complementary
  • contentinfo
  • definition
  • dialog window
  • catalog
  • Document
  • innings
  • figure
  • the form
  • Grid
  • Gridcell
  • groups
  • heading
  • IMG
  • link
  • list
  • Listbox
  • Listitem
  • Journal
  • Main
  • marquee
  • maths
  • menu
  • Menu bar
  • MenuItem
  • menuitemcheckbox
  • menuitemradio
  • navigation
  • no one
  • note
  • options
  • presentation
  • progress bar
  • radio
  • Radiogroup
  • region
  • line
  • rowgroup
  • rowheader
  • scroll bars
  • Search
  • Searchbox
  • Separator
  • slider
  • in input fields
  • Status
  • Switch
  • tab
  • Table
  • tablist
  • tabpanel
  • Term
  • text field
  • Timer
  • Toolbar
  • tooltip
  • wood
  • Treegrid
  • Treeitem
+4
May 03 '17 at 17:56
source share



All Articles