Opened 7 weeks ago
Last modified 6 weeks ago
#64932 accepted defect (bug)
WP admin - Subpages in the list of pages are not indicated as subpages for blind people
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.1 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | good-first-bug has-patch |
| Focuses: | accessibility, administration | Cc: |
Description
Description of the problem
In the WordPress administration, in the list of all pages, a sighted person can identify subpages thanks to a long dash before the name of the subpage (example: — A subpage of a page). And so, you know that the above page is its parent.
But, this is absolutely not accessible to blind people.
The code of the link on the page name is that one: <a class="row-title" href="https://example.org/wp-admin/post.php?post=554&action=edit" aria-label="“My beautiful subpage” (Edit)">— My beautiful subpage</a>
The aria-label attribute removes the long dash and doesn't replace it by the information it conveys.
What is expected
- The link name should, at least, inform that a subpage is a subpage.
- It would also ideally give the name of the parent page because you can see it quickly but a blind person must navigate until they find a link which is not indicated as a subpage.
We could have: <a class="row-title" href="https://example.org/wp-admin/post.php?post=554&action=edit" aria-label="“My beautiful subpage” (subpage of “Wonderful page”) (Edit)">— My beautiful subpage</a>
Attachments (1)
Change History (14)
#2
in reply to:
↑ description
@
7 weeks ago
$parent_name was empty for pages with subpages, but if I set the value than this part works (code below) and subpage name is concatinated to title. I guess in that case no aria label needed
if ( isset( $parent_name ) ) {
$post_type_object = get_post_type_object( $post->post_type );
echo ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html( $parent_name );
}
#3
@
7 weeks ago
I think that adding the text "Parent Page: [Name of the page]" next to the link is a good alternative to have the name of the parent page.
But, the aria-label is still required because:
- It is already adding the information that the link is an edit link (the "(Edit)" at the end).
- We still need to add an alternative to the long dash in the link name.
So, with your proposal, I recommend just adding the text "Subpage" before the page name in the aria-label:
<a class="row-title" href="https://example.org/wp-admin/post.php?post=554&action=edit" aria-label="Subpage “My beautiful subpage” (Edit)">— My beautiful subpage</a>
This ticket was mentioned in PR #11350 on WordPress/wordpress-develop by @ekaterina92.
6 weeks ago
#4
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/64932
## Use of AI Tools
This ticket was mentioned in PR #11353 on WordPress/wordpress-develop by @ekaterina92.
6 weeks ago
#5
Trac ticket: https://core.trac.wordpress.org/ticket/64932
Added an aria-label for subpages because with screen reader it's not clear if it's a page or subpage.
## Use of AI Tools
#6
@
6 weeks ago
I just saw that aria labels were actually recently removed from those links https://core.trac.wordpress.org/ticket/33002 but they didn't have information about subpages.
#7
follow-up:
↓ 8
@
6 weeks ago
I was not aware of that removing. Thank you for the information.
I've tested your PR (thankyou!) on the WordPress Playground and it seems good but I noticed that there is the "(Edit)" in the aria-label so if #33002 removed it, we shouldn't re-add it.
So it should be:
<a class="row-title" href="https://example.org/wp-admin/post.php?post=554&action=edit" aria-label="Subpage “My beautiful subpage”">— My beautiful subpage</a>
#8
in reply to:
↑ 7
@
6 weeks ago
I added a new commit to the same branch, but I guess I should have created a new pull request (or not?)
Sorry, I'm new here.
#9
@
6 weeks ago
It might be OK to add a commit, I guess.
For me, the PR is OK but I'm not a person who can validate. I let the WordPress team do it.
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
6 weeks ago
#11
@
6 weeks ago
- Milestone changed from Awaiting Review to 7.1
- Owner set to joedolson
- Status changed from new to accepted
Thank you! I'm milestoning this for 7.1 and taking ownership to shepherd through.
The reason that the aria-label was removed was also to improve the experience for voice command users, who benefit from having the accessible name of a control match the visual name - so I'd prefer to find a way that doesn't require re-breaking that fix.

Hi and thanks for the ticket Julie,
I confirm there is currently no indication of a page being a child of another one.
Adding
good-first-bugas this seems like a pretty simple patch at a glance.