E-mail List Archives
Thread: Double encoding of elements
Number of posts in this thread: 5 (In chronological order)
From: Mark Guisinger
Date: Mon, Oct 26 2015 6:38AM
Subject: Double encoding of elements
No previous message | Next message →
What do people think about double encoding of elements with aria roles (i.e.<header role="banner">). Is there an advantage with older screen readers or browsers?
Thanks,Mark Guisinger
From: Birkir R. Gunnarsson
Date: Mon, Oct 26 2015 6:53AM
Subject: Re: Double encoding of elements
← Previous message | Next message →
Mark
In theory this coding practice should be discouraged, and some
accessibility checkers such as AXe correctly call it out.
However, there are still times where the only way to get an ARIA
property announced to assistive technologies is to ad the explicit
ARIA role.
e.g:
Assistive technologies such as screen readers will not remap a heading
to a different level unless the heading role is present.
Does not work (with NVDA and Jaws, latest testing a few months ago):
<h3 aria-level="2">This is an h3 heading, that we want to map to an h2
in the accessibility tree</h3>
whereas this works:
<h3 role="heading" aria-level="2">This is an h3 heading, that we want
to map to an h2 in the accessibility tree</h3>
similarly, if you want the accessible name for a form, provided via
aria-label or aria-labelledby, to be announced on forms you need to
specify the form role.
<form role="form" aria-label="Login">
..
</form>
Ultimately these are bugs and we need to help eliminate them rather
than do the hakcs, but until then, sometimes you just need the
information communicated to the user.
Only consider the hack if your assistive technology testing indicates
that doing things correctly does not get to the end user.
Also consider these best practice issues, since ultimately it is the
user agent, either browser or assistive technology, that is not doing
its part in the process.
-B
On 10/26/15, Mark Guisinger via WebAIM-Forum
< = EMAIL ADDRESS REMOVED = > wrote:
> What do people think about double encoding of elements with aria roles
> (i.e.<header role="banner">). Is there an advantage with older screen
> readers or browsers?
> Thanks,Mark Guisinger
> > > > >
--
Work hard. Have fun. Make history.
From: Moore,Michael (Accessibility) (HHSC)
Date: Mon, Oct 26 2015 7:51AM
Subject: Re: Double encoding of elements
← Previous message | Next message →
Actually for the specific example that you have given I think that it is fine. There may be more than one legitimate use of the <header> element within the page (for example the header for an article) but there will only be one banner region.
Mike Moore
Accessibility Coordinator
Texas Health and Human Services Commission
Civil Rights Office
(512) 438-3431 (Office)
From: Sailesh Panchang
Date: Mon, Oct 26 2015 8:57AM
Subject: Re: Double encoding of elements
← Previous message | Next message →
<header roleºnner> ...</header> or <main role="main"> ...</main>
<h3 role="heading" aria-level="2">This is an h3 heading, that we want
to map to an h2 in the accessibility tree</h3>
will all generate validator warnings.
The roleºnner or role=main examples above may be justified in order
to support older browser - assistive technology combos.
With regard to the above <h3> example, it is better to place the
role=heading and the heading text in a span within the h3.
With default styling , visually, the h3 heading is exposed as a level
3 heading; so tricking screen readers to interpret it as an h2 may
misrepresent structure. It is best to use the h2 tag in place of the
h3.
Best regards,
Sailesh Panchang
On 10/26/15, Moore,Michael (Accessibility) (HHSC)
< = EMAIL ADDRESS REMOVED = > wrote:
> Actually for the specific example that you have given I think that it is
> fine. There may be more than one legitimate use of the <header> element
> within the page (for example the header for an article) but there will only
> be one banner region.
>
> Mike Moore
> Accessibility Coordinator
> Texas Health and Human Services Commission
> Civil Rights Office
> (512) 438-3431 (Office)
>
>
From: Kevin Prince
Date: Mon, Oct 26 2015 6:39PM
Subject: Re: Double encoding of elements
← Previous message | No next message
My first thought too - if its an H3 then its an h3 not a different visual interpretation of H2
K
Access1in5
0212220638
039290692
Independent Accessibility and IT Consultancy.
> On 27/10/2015, at 03:57, Sailesh Panchang < = EMAIL ADDRESS REMOVED = > wrote:
>
> <header roleºnner> ...</header> or <main role="main"> ...</main>
> <h3 role="heading" aria-level="2">This is an h3 heading, that we want
> to map to an h2 in the accessibility tree</h3>
> will all generate validator warnings.
> The roleºnner or role=main examples above may be justified in order
> to support older browser - assistive technology combos.
> With regard to the above <h3> example, it is better to place the
> role=heading and the heading text in a span within the h3.
> With default styling , visually, the h3 heading is exposed as a level
> 3 heading; so tricking screen readers to interpret it as an h2 may
> misrepresent structure. It is best to use the h2 tag in place of the
> h3.
> Best regards,
> Sailesh Panchang
>
>
> On 10/26/15, Moore,Michael (Accessibility) (HHSC)
> < = EMAIL ADDRESS REMOVED = > wrote:
>> Actually for the specific example that you have given I think that it is
>> fine. There may be more than one legitimate use of the <header> element
>> within the page (for example the header for an article) but there will only
>> be one banner region.
>>
>> Mike Moore
>> Accessibility Coordinator
>> Texas Health and Human Services Commission
>> Civil Rights Office
>> (512) 438-3431 (Office)
>>
>>