WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: html5 and ARIA landmark roles

for

From: Birkir R. Gunnarsson
Date: Nov 21, 2015 6:40PM


Also, keep in mind that if you intend to use an ARIA attribute on your
landmark role, you usually have to add the role, even if the html
element should be mapped to that role by the browser.
E.g. this code does not add an accessible name (in my testing, though limited):
<form aria-label="login">
..
</form>

But this adds the name
<form role="form" aria-label="Login">
...
</form>

Though not a landmark role, I see same problem when I try to apply an
aria-level to a h1 through h6 element
<h1 aria-level="2">This should be an h2 heading</h1>
..
it remains an h1.
But
<h1 role="heading" aria-level="2">This should be an h2 heading</h1>
works, it generally gets mapped to an h2.
This is reasonable in a sense .. maybe first you need to map an h1 tag
to a generic heading role before the aria-level tag can become
effective, but on the other hand specs say you should not use
role="heading" on an h1/h6 tag because they naturally map to that
role.
Cheers
-B


On 11/18/15, Léonie Watson < <EMAIL REMOVED> > wrote:
>> From: WebAIM-Forum On Behalf Of Joseph Sherman
>> Sent: 18 November 2015 19:39
>> Should developers add ARIA roles to html5 elements with default roles,
>> like
>> nav, main, header(banner), footer(contentinfo)? My testing shows different
>> treatment of the html5 elements between various browsers and AT
>> combinations.
>
> IE does not support the <main> element, and it does not have accessibility
> support for other elements that are native HTML counterparts to ARIA
> landmark roles. Firefox, Safari, and Chrome (plus other Blink based
> browsers) have accessibility support for these elements. You can find out
> which browsers have implimented and/or have accessibility support on
> html5accessibility.com.
>
> Depending on how a screen reader obtains information from the browser,
> behaviour differs further. For example, Jaws obtains information directly
> from the DOM in IE and so it supports these landmark elements in spite of
> the fact that IE itself doesn't have accessibility support. NVDA on the
> other hand uses the platform accessibility APIs to obtain information from
> IE and so it doesn't support these landmark elements.
>
> Whereas most current browsers implicitly support the mapping of ARIA
> landmark roles to HTML elements, older browsers and screen readers are less
> likely to. There was also a time when ARIA support was more advanced in both
> browsers and screen readers than HTML5 support. This too can influence the
> decision as to whether you need to apply landmark roles explicitly to their
> HTML element counterparts.
>
> Léonie.
>
> --
> Senior accessibility engineer @LeonieWatson @PacielloGroup
>
>
>
> > > > >


--
Work hard. Have fun. Make history.