Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#46977 closed enhancement (worksforme)

WP_List_Table table headers are missing `role=`columnheader` for accessibility

Reported by: dannylonglegs's profile 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)

#1 @johnbillion
6 years ago

  • Component changed from General to Administration
  • Focuses accessibility added

#2 @johnbillion
6 years ago

  • Keywords needs-patch added

#3 @afercia
6 years ago

  • Keywords reporter-feedback added; needs-patch removed

@dannylonglegs thanks for your report and welcome to Trac! Worth noting the tables you're referring to already use a proper th element with a scope 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?

#4 @SteelWagstaff
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.

#5 @afercia
6 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Version 5.1.1 deleted

@SteelWagstaff thanks. Please do feel free to reopen the ticket if need be. Also, conversation can continue on closed tickets :)

Note: See TracTickets for help on using tickets.