WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 8 months ago

Last modified 6 months ago

#46725 closed defect (bug) (fixed)

Site Health: make sure layout tables have no semantics

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

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 8 months ago.
Created initial patch to add an ARIA role="presentation" to the table element.
46725.2.diff (513 bytes) - added by chetan200891 8 months ago.
Last patch was showing changes of other ticket. so updated patch. :)

Download all attachments as: .zip

Change History (6)

@chetan200891
8 months ago

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

#1 @chetan200891
8 months ago

  • Keywords has-patch added

@chetan200891
8 months ago

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

#2 @afercia
8 months 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.


8 months ago

#4 @spacedmonkey
6 months ago

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