#61480 closed defect (bug) (fixed)
Comment reply admin notices not announced by screen readers
Reported by: | joedolson | Owned by: | peterwilsoncc |
---|---|---|---|
Milestone: | 6.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Comments | Keywords: | has-patch needs-testing |
Focuses: | accessibility | Cc: |
Description
The comment reply admin notice does not get announced by screen readers when notice content is injected into the admin notice container. This can either be resolved by role="alert"
or wp.a11y.speak()
.
Attachments (2)
Change History (15)
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
5 months ago
#4
@
5 months ago
@joedolson Either version looks like an improvement, I'm happy with either approach. Is there a best practice favouring one over the other?
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
4 months ago
#6
@
4 months ago
- Keywords needs-testing added
Nobody else seems to have a preference; so I'm going to go with role="alert"
. The argument, in my opinion, is that it keeps the behavior associated directly with the call that sets up the HTML, but I don't really think it matters overall.
To test:
Using a screen reader, go to Comments. Click 'Reply' on a comment. Click the 'Reply' button primary to submit a blank comment. This will spawn an admin notice error.
Before patch: No announcement from the screen reader.
After patch: The error is announced by the screen reader.
#7
@
4 months ago
I tested each of the patches and could only get the one using JavaScript to announce the error when using VoiceOver on macOS.
It's possible that's due to a configuration error in my settings as I don't know the settings very well.
#8
follow-up:
↓ 10
@
4 months ago
It could also be a distinction between VoiceOver and other, more standards compliant screen readers. But, it's no problem to just choose the JS driven announcement in order to get better support with VoiceOver.
This ticket was mentioned in PR #7218 on WordPress/wordpress-develop by @peterwilsoncc.
4 months ago
#9
- Uses wp.speak to announce an error when replying to comments within the dashboard
- Adds wp-a11y as a dependency to the JavaScript
Trac ticket: https://core.trac.wordpress.org/ticket/61480
#10
in reply to:
↑ 8
@
4 months ago
Replying to joedolson:
It could also be a distinction between VoiceOver and other, more standards compliant screen readers. But, it's no problem to just choose the JS driven announcement in order to get better support with VoiceOver.
OK, let's do that.
In the linked pull request I've added wp-a11y
as a dependency to the script and included the code in 61480.speak.diff.
#11
@
4 months ago
Testing notes using Joe's patch with the inclusion of the enqueue dependency.
Test Report
This report validates that the indicated patch addresses the issue.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/7218
Environment
- OS: macOS 14.6.1
- Web Server: Nginx
- PHP: 8.1.29
- WordPress: 6.7-alpha @ r58919
- Browser: Firefox 129.0.1
- Theme: Twenty Twenty-Four
- Active Plugins:
- Query Monitor 3.16.4
Actual Results
- ✅ Issue resolved with patch.
Testing Notes
- Checkout trunk without patch
- Run
npm run build:dev
- Enable Voice over in System settings
- Open WP Dashboard Comments screen
- Hover over test comment
- Click reply link
- Submit empty reply
- ❌ Error announced
- Apply patch
- Run
npm run build:dev
- Open WP Dashboard Comments screen
- Hover over test comment
- Click reply link
- Submit empty reply
- ✅ Error announced.
Patch using
role="alert"