WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: WCAG and role="presentation"

for

From: Mark Rogers
Date: Aug 24, 2017 1:09AM


Without role=presentation or TH screen readers use heuristics to decide if a table is layout or data. The heuristics vary greatly between screen readers, so a table can be voiced as layout in one screen reader, but data in another.

Data used by heuristics includes: number of rows, style of cell borders and row background, presence of form controls, embedded objects and nested tables. NVDA uses different heuristics if it's running with IE (where it uses NVDA's own heuristics) and Firefox (where it uses Firefox's layout-guess heuristic).

JAWS 16 and earlier (and possibly recent versions) decide that a table with more than 2 cells and more than 2 rows with 4 cells between 200 and 16,000 square pixels is a data table. This is affected by factors unrelated to the table data such as browser window size and default browser font size. It also produces different results on IE (where it includes cell padding in size calculation) and Firefox (excludes cell padding from size calculation). If you have a table with width0% you can flip it between layout and data just by resizing the window.

Basically without role=presentation or TH you have Schrödinger's layout table - it will be voiced as layout or data depending on a combination of screen reader, browser, window size and default font size.

Best Regards
Mark

--
Mark Rogers - <EMAIL REMOVED>
PowerMapper Software Ltd - www.powermapper.com
Registered in Scotland No 362274 Quartermile 2 Edinburgh EH3 9GL



On 23/08/2017, 15:25, "WebAIM-Forum on behalf of Jonathan Avila" < <EMAIL REMOVED> on behalf of <EMAIL REMOVED> > wrote:

> Let's also keep in mind that using role="presentation" is easy.

While I think we'd all agree that it is best to use role presentation -- the question is whether it is a violation of WCAG. If table markup is not used with TH, scope or other header association markup then the table is not identifying header cells and it can be programmatically determined that the table is a layout table. Since WCAG 2 was written without relying on ARIA and was written before the ARIA spec was finalized -- the supporting document seem to indicate that it's not a failure of WCAG as long as not using role presentation is accessibility supported. However we don't have specific guidance on this and others are likely to disagree.

Ideally these are the types of things that need to be clearly defined in supporting documents so we can achieve consistency with testing tools and with conformance evaluations. Questions such as this can be raised with the Accessibility Guidelines Working Group on Github (https://github.com/w3c/wcag/issues). If you feel strongly about something it might be helpful to put together a suggested failure technique -- although getting failure techniques accepted has been proven difficult.

Jonathan

Jonathan Avila
Chief Accessibility Officer
Level Access, inc. (formerly SSB BART Group, inc.)
(703) 637-8957
<EMAIL REMOVED>
Visit us online: Website | Twitter | Facebook | LinkedIn | Blog
Looking to boost your accessibility knowledge? Check out our free webinars!

The information contained in this transmission may be attorney privileged and/or confidential information intended for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this communication is strictly prohibited.