feat!: announce toasts via shared ARIA live region#9672
Open
mikeharv wants to merge 3 commits intoRaspberryPiFoundation:v13from
Open
feat!: announce toasts via shared ARIA live region#9672mikeharv wants to merge 3 commits intoRaspberryPiFoundation:v13from
mikeharv wants to merge 3 commits intoRaspberryPiFoundation:v13from
Conversation
BenHenning
requested changes
Apr 1, 2026
Collaborator
BenHenning
left a comment
There was a problem hiding this comment.
Thanks @mikeharv! Changes look good though I do have one concern that will need to be addressed before this can be merged. PTAL.
BenHenning
approved these changes
Apr 3, 2026
Collaborator
BenHenning
left a comment
There was a problem hiding this comment.
Thanks @mikeharv! No other concerns from me, this looks good!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The basics
The details
Resolves
Fixes #9667
Proposed Changes
This PR updates the Toast utility to use the shared
announceDynamicAriaState()live region instead of managing its ownaria-liveregion on each toast.Changes include:
role="status"andaria-livefrom the toast DOM element.announceDynamicAriaState()when a toast is shown.Toast.Assertivenessenum and replaced usage witharia.LiveRegionAssertiveness.Breaking Change
This work removes
Blockly.Toast.Assertiveness. Users who have depended upon this will want to switch to the equivalentBlockly.utils.aria.LiveRegionAssertiveness.Reason for Changes
Previously, each toast managed its own
aria-liveregion. This could lead to duplicate or inconsistent screen reader announcements and duplicated ARIA logic across components.Using the shared
announceDynamicAriaState()utility centralizes live region management, ensures consistent announcement behavior, and aligns toast announcements with other dynamic ARIA announcements in Blockly.Test Coverage
Tests were updated to reflect the new architecture:
statusrole.politeand respects theassertivenessoption when provided.aria-liveorrole="status"to prevent duplicate announcements.