Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#46725 closed defect (bug) (fixed)

Site Health: make sure layout tables have no semantics

Reported by: afercia's profile afercia Owned by: afercia's profile afercia
Milestone: 5.2 Priority: normal
Severity: normal Version: 5.2
Component: Site Health Keywords: has-screenshots site-health has-patch
Focuses: accessibility Cc:

Description

The Site Health Info reports use HTML tables. See in the screenshot below:

http://cldup.com/EwBfJkFPZW.png

During today's accessibility team meeting, we've discussed if these tables should be treated as data tables (and thus have proper table headers) or as simple layout tables.

Agreed for layout tables, as the table data is "relational in rows, it's just that it's not totally consistent data types that could use headers effectively."

In fact, the data in the right column can be paths, sizes, names, version numbers, URLs, etc. That makes nearly impossible to identify some headers text that can accurately represent the data type.

Also, agreed the most important thing is to communicate this data to assistive technologies in the simpler possible way (ensuring the content makes sense when linearized) rather than trying to identify what HTML semantics could be the most appropriate.

The accessibility team recommendation is to add an ARIA role="presentation" to the table element. For technologies that support ARIA, this actually removes any semantics from the table and its required children (all the cells).

Tests and support data available on powermapper:
https://www.powermapper.com/tests/screen-readers/tables/table-role-presentation-layout-table/

Attachments (2)

46725.diff (1.3 KB) - added by chetan200891 6 years ago.
Created initial patch to add an ARIA role="presentation" to the table element.
46725.2.diff (513 bytes) - added by chetan200891 6 years ago.
Last patch was showing changes of other ticket. so updated patch. :)

Download all attachments as: .zip

Change History (6)

@chetan200891
6 years ago

Created initial patch to add an ARIA role="presentation" to the table element.

#1 @chetan200891
6 years ago

  • Keywords has-patch added

@chetan200891
6 years ago

Last patch was showing changes of other ticket. so updated patch. :)

#2 @afercia
6 years ago

  • Owner set to afercia
  • Resolution set to fixed
  • Status changed from new to closed

In 45075:

Accessibility: Make sure the Site Health layout tables are correctly linearized.

Adds role="presentation" to the <table> elements used in the Site Health reports.

Ideally, HTML tables should be used for tabular data. When tables are used for layout purposes, it's important to remove any native semantics so that assistive technologies can correctly announce the table content in a linearized fashion.

Props chetan200891.
Fixes #46725.

This ticket was mentioned in Slack in #accessibility by greatislander. View the logs.


6 years ago

#4 @spacedmonkey
5 years ago

  • Component changed from Administration to Site Health
Note: See TracTickets for help on using tickets.