#46977 closed enhancement (worksforme)
WP_List_Table table headers are missing `role=`columnheader` for accessibility
Reported by: | dannylonglegs | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | |
Focuses: | accessibility | Cc: |
Description
WP_List_Table table headers should have role="columnheader"
for accessibility purposes. During a recent accessibility audit, we were told that table headers should have the ARIA role in addition to scope="col"
.
Here is a link to the code:
https://github.com/WordPress/WordPress/blob/6fcd28170794db7675485c55cf1eb123f5297d33/wp-admin/includes/class-wp-list-table.php#L1137
Change History (5)
#4
@
6 years ago
- Resolution set to worksforme
- Status changed from new to closed
Thanks @afercia. I'm @dannylonglegs's colleague at Pressbooks. We've reached back out to the auditor for clarification, but the link you provided does seem to indicate that the th
element with scope
attribute is semantically equivalent, so it looks good to me. We will update if we hear otherwise, but I think we're content to consider this ticket resolved, pending further notice.
@dannylonglegs thanks for your report and welcome to Trac! Worth noting the tables you're referring to already use a proper
th
element with ascope
attribute. In this case, I'm not sure a columnheader role is required as it would just duplicate the already existing semantics.When you have a chance, can you please provide more context or ask the persons who told you why they think columnheader is necessary?