#32892 closed defect (bug) (fixed)
List table: Select %s shouldn't be a row header
| Reported by: | afercia | Owned by: | joedolson |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.1 |
| Component: | Administration | Version: | 4.2 |
| Severity: | normal | Keywords: | has-patch has-test-info has-dev-note |
| Cc: | Focuses: | ui, accessibility |
Description
See related #31654 and #26167.
In all the List Tables in the admin, the "Select %s" (where %s is the name of the Post, Attachment, Plugin, User, etc,) is used as row header:
<th scope="row" class="check-column">
This is not correct from a semantics and accessibility point of view for all the reasons mentioned in #31654. The row header should be the cell with the main object the table refers to: the Post title, the Plugin name, etc.
We could also consider to use the abbr attribute: http://www.w3.org/TR/html5/tabular-data.html#attr-th-abbr
that would be consistent with what is currently proposed in sortable column headers ticket
Attachments (5)
Change History (45)
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
10 years ago
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
17 months ago
#6
@
15 months ago
- Keywords needs-patch removed
Added in [15622]
This is a rough implementation and a thought put into existence. This doesn't account for the styling and CSS ruleset changes. I want opinions on whether this is the right direction to move forward.
This ticket was mentioned in PR #9761 on WordPress/wordpress-develop by @abcd95.
12 months ago
#7
- Keywords has-patch added
12 months ago
#8
Other list tables, such as the Users list and multi-site tables, are yet to be updated. Additionally, the styling has been affected, which I will address in the subsequent commits.
12 months ago
#9
The styles of the plugins list table and highly coupled, and removing padding on unselected rows is affecting other headers. Debugging deeper into this -
https://github.com/user-attachments/assets/40799432-d840-45df-a424-ca097078949d
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
10 months ago
#11
follow-up:
↓ 12
@
10 months ago
- Milestone Future Release → 7.0
Thanks for your work on this, @abcd95!
I think that the direction is valid, although I'm a little concerned that that row actions will pollute the name too much. That might need testing with users, to see if it's too annoying.
The excerpt is also in the name cell in extended view, and that could make it even worse.
#12
in reply to: ↑ 11
@
10 months ago
Replying to joedolson:
I think that the direction is valid, although I'm a little concerned that that row actions will pollute the name too much.
Thanks for the feedback, @joedolson
Regarding the concerns about row actions and excerpts "polluting" the name cell -
You're right that this warrants testing. The row actions are semantically related to the row item (title/name), so having them within the <th scope="row"> makes logical sense from an accessibility standpoint (I'm gonna defer to your judgement here tho). I also understand your concern about the verbosity.
Could we -
- Explore using
aria-labelledbyoraria-describedbyto separate the core identification (title) from supplementary content (actions/excerpt) - Consider moving the excerpt outside the
<th>into a separate<td>in a new row (similar to how plugin descriptions work)
Looking forward to what other contributos have to say about this. Thanks for helping out with this one.
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
8 months ago
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
7 months ago
#15
@
6 months ago
- Milestone 7.0 → 7.1
This hasn't gotten the attention it needs for 7.0, so I'm moving it to 7.1. I think this is a reasonable follow after some of the other work I've done on list tables in 7.0, so it's a good candidate for the next release.
#16
@
3 months ago
I tested a bit the linked PR at https://github.com/WordPress/wordpress-develop/pull/9761
Seems to me it's moving to a good direction. A couple things:
Explore using aria-labelledby ...
@abcd95 I'd encourage to explore aria-label. I tried adding it to the title cell, e.g.:
<th aria-label="' . esc_attr( $post->post_title ) . '" scope="row" ...
That way, the cell name is way cleaner and screen readers would announce a clean row header. See attached screenshot. However:
- We should make sure aria-label doesn't have any impact on the announcement of the row action links and other content of the cell. This should be tested with the most popular combinations of browsers and screen readers.
- My quick try was made by changing the
_column_titlemethod in the sub class for the posts. That works but isn't ideal because it delegates the responsibility to the sub classes. We can take care of the ones used in core but custom classes used by plugins wouldn't necessarily follow this pattern. Ideally, the parent class should be responsible to add the aria-label. - I'm not sure the use of
abbrin the PR is actually useful but we could double check that later.
Lastly, I'm not sure why the link to the post in the cell is announced by prepending 'Title and Title'. See second screenshot. This should be investigated.
#17
@
3 months ago
To clarify the first screenshot above:
- Use a screen reader.
- Navigate the 'Author' column vertically by using arrow keys.
- When moving to a new row, observe the Title cell, which is now the row header, is announced cleanly by referencing only the post title.
This ticket was mentioned in Slack in #core-test by nikunj8866. View the logs.
2 months ago
#19
@
2 months ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/9761
Environment
- WordPress: 7.1-alpha-62161-src
- Subdirectory: No
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
- Browser: Safari 26.5.2
- OS: macOS
- Theme: Twenty Twenty-Five 1.5
- MU Plugins: None activated
- Plugins:
- Test Reports 1.3.0
Steps taken
- Add 2 or more posts
- Go to posts list and using Chrome Dev Tools, observe the title column as
<th scope=" row" class="check-column"> - Using screen reader head over to second row's title column. (In my case I used Safari and MacOS's built-in Voice Over)
- Observe the title column announced as "row 3 of 4 Select Post1 and Select Post1 link, Post1" (see screenshot - before)
- Apply patch
- Repeat step2 and observe the same row which appears as
"<th scope=" row" class="title column-title has-row-actions column-primary page-title" data-colname="Title" aria-label="Post1" - Using the screen reader, navigate to the post title from the previous row and observe that it's announced as "Title Post1, link, Post1, column 2 of 3" this time. (see screenshot - after)
- ✅ Patch is solving the problem
Expected result
- Having aria-label and other additional attributes help screen readers output better results with improved accessibility.
Screenshots/Screencast with results
This ticket was mentioned in Slack in #core-test by nikunj8866. View the logs.
2 months ago
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
7 weeks ago
#23
@
7 weeks ago
- Keywords needs-dev-note commit added
I added some missing CSS to fix the alignment of the checkbox, and a fallback "no title" to use as the aria-label when the post is untitled, as it otherwise omitted the aria-label.
I wasn't able to reproduce the Title and Title Block... announcement that @afercia got; the closest I could get was when arrowing into the sortable columns, the sort column type is announced from the column header. But that's generally just "Title" or "Title + sort type"; so that's only part of the result.
However, I think that this is a clear improvement on what we have now, and worth implementing. It will need a dev note, as this could impact extenders targeting th.check-column.
#24
follow-up:
↓ 26
@
7 weeks ago
I tested this technique on Windows, as well, and it works in JAWS, but not in NVDA. There's an issue for this on NVDA, but it's closed as not planned, so it's unlikely to change soon.
https://github.com/nvaccess/nvda/issues/17213
In my opinon, this is still better than the existing behavior, even with the excess verbosity. Users can stop their screenreader by moving on, and the first content announced is still the post title information, so the relevant information is conveyed immediately. This is better than the clearly inaccurate 'Select [post title]'.
#26
in reply to: ↑ 24
@
7 weeks ago
Replying to joedolson:
I tested this technique on Windows, as well, and it works in JAWS, but not in NVDA. There's an issue for this on NVDA, but it's closed as not planned, so it's unlikely to change soon.
In my opinon, this is still better than the existing behavior ...
I'd agree. I commented on the NVDA issue, kindly asking for reconsideration.
#28
@
7 weeks ago
- Resolution fixed
- Status closed → reopened
Re-opening to follow up with overlooked JS changes.
This ticket was mentioned in PR #12666 on WordPress/wordpress-develop by @joedolson.
7 weeks ago
#29
Follow up due to overlooked JS changes.
Trac ticket: https://core.trac.wordpress.org/ticket/32892
## Use of AI Tools
#30
@
7 weeks ago
@joedolson: It also appears that this has changed the styling of e.g. the cells in the "Title" column of the Posts and Pages screens.
These previously were tds which had
.widefat td {
vertical-align: top;
}
applied to them. Now, as th, they no longer have that vertical alignment so that they are moved a bit down.
#31
@
7 weeks ago
Yes, I see that - in my test environment, none of the rows had greater height than the title fields, so that wasn't obvious. Will fix at the same time. Thanks!
#33
@
7 weeks ago
- Resolution fixed
- Status closed → reopened
It's nice to see this merged.
As a follow-up, I would like to propose to improve a few other tables. In these tables, the th row header is now correctly the cell of the primary column. However, there's no aria-label set on the th so that the accessible name still contains redundant, noisy, content (row actions and the like).
Here's the tables that would benefit from the aria-label:
- 'WP_Media_List_Table' in Media Library > List view
- 'WP_Terms_List_Table' e.g. Categories and Tags
- 'WP_MS_Sites_List_Table' in Network Admin > Sites
- 'WP_MS_Users_List_Table' in Network Admin > Users
- 'WP_Privacy_Data_Export_Requests_List_Table' in Tools > Export Personal Data
- 'WP_Privacy_Data_Removal_Requests_List_Table' in Tools > Erase Personal Data
If no objections, I'll try to submit a new PR for them.
Additionally, there are a few special cases. Some of them don't need any action, mentioning them for completeness:
'WP_Application_Passwords_List_Table' in Edit User / Useer Profile > Application Passwords
When first created via AJAX, the cell with the App name is a <td>. Only after refreshing the page is a <th>. I will create a separate ticket.
'WP_Comments_List_Table' in Comments
The row header is the 'Comment' cell. I think that's fine, open to suggestions.
'WP_Post_Comments_List_Table' in Classic Editor, must be enabled from Screen Options, it is rendered when manually adding a comment in the edit post screen.
As above, the row header is the 'Comment' cell.
However, the table does not have a thead with column headers. Open to suggestions.
'WP_Links_List_Table' in Links Manager, hidden for new installs since WordPress 3.5. To re-enable it, see the plugin https://wordpress.org/plugins/link-manager/. If the fix is trivial, I'd vot eto fix it.
'WP_Plugin_Install_List_Table' in PLugins > Add Plugins
Does not use a table.
'WP_Themes_List_Table' I believe it's no longer used by core, kept for backward compatibility.
'WP_Theme_Install_List_Table' I believe it's no longer used by core, kept for backward compatibility.
This ticket was mentioned in PR #12683 on WordPress/wordpress-develop by @afercia.
7 weeks ago
#34
Trac ticket: https://core.trac.wordpress.org/ticket/32892
Adds aria-label attributes to more list table row headers, to provide cleaner names for screen reader users.
Corrects @since notation after changeset 62838.
## Use of AI Tools
None
#35
@
7 weeks ago
- Keywords commit removed
https://github.com/WordPress/wordpress-develop/pull/12683 adds aria-labels to more list table row headers.
Also, corrects @since notation after [62838].
The added labels build on top of [62838], just implementing the provided method get_primary_column_aria_label(). Review welcome.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)


One more good reason to address this issue is that, when a post is locked and the lock icon appears, the icon has no label or text that can be announced so screen readers will read out the column header "Select All";