Revisions: Ensure assertive announcements when exiting or restoring revisions #80036
Revisions: Ensure assertive announcements when exiting or restoring revisions #80036himanshupathak95 wants to merge 2 commits into
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What?
Part of #77530
Ensures that exiting the Revisions mode and restoring a revision trigger reliable, assertive screen reader announcements.
Why?
Previously, exiting or restoring revisions inconsistently announced confirmations. Restoring triggered a standard
politesnackbar notification, which was frequently interrupted and dropped by screen readers due to focus shifting back to the main editor context. Furthermore, clicking "Exit" provided no explicit screen reader confirmation. Utilizing an assertive live region ensures users get immediate feedback that their action succeeded, regardless of underlying focus changes.How?
speakfrom@wordpress/a11y.speak( __( 'Revisions exited.' ), 'assertive' );to theonClickhandler of the Revisions "Exit" button.speak( message, 'assertive' );in therestoreRevisionaction prior to creating the snackbar success notice.speak: false) to prevent redundant double announcements.Testing Instructions
Screenshots or screencast
Screen.Recording.2026-07-09.at.17.55.49.mov