WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: sortable table/grid


From: Murphy, Sean
Date: Apr 28, 2020 12:23AM


I have just discovered a very interesting fact in relation to nav element. In an old Webaim article https://webaim.org/blog/future-web-accessibility-html5-semantic-tags/ : https://webaim.org/blog/future-web-accessibility-html5-semantic-tags/. The below text has been extracted from the article (note this is a 2012 article):

--- beginning of extract ----

There is significant overlap between the semantic meaning of many of the new HTML5 semantic elements and some of the document structure and landmark roles from WAI-ARIA. The HTML5 spec contains a section on ARIA dealing with how the different roles can be applied to HTML5 elements.

In some cases, HTML5 requires user agents to automatically use specific ARIA roles on certain elements, without the author having to specifically include them, and in fact even if the author explicitly says to use some other role. For example, the HTML5 <nav> element must always have the ARIA navigation role, with no exceptions. So <nav> (with no ARIA role specified), <nav role="navigation"> and <nav role="main"> will be all handled by web browsers and assistive technology as if they were each <nav role="navigation">.

-- end of extract ---

I have just tested this and the above statement is not true any more. Using the latest firefox and chrome with NVDA and Jaws. When I used <nav role="button"> the role changed to a button. The formal html5 specifications show the following:

• Contexts in which this element can be used: Where flow content is expected.
• Content model: Flow content, but with no main element descendants.
• Tag omission in text/html: Neither tag is omissible
• Content attributes: Global attributes
• Allowed ARIA role attribute values: navigation role (default - do not set).
• Allowed ARIA state and property attributes: Global aria-* attributes
Any aria-* attributes applicable to the default role.

The above specs don't indicate clearly if any other roles can be set. The absence of other ARIA roles, does this mean no other roles should be set? If my assumption is correct, does this mean the browsers are not correctly implementing the specs?