Expose Screen Reader Mode over the iframe API#11459
Merged
riknoll merged 4 commits intoJul 10, 2026
Merged
Conversation
Adds a "togglescreenreadermode" editor message that behaves like the settings menu toggle (including the "settings" telemetry event source), and reports the current state via a new screenReaderMode field on the "info" response. As part of this change I realised that toggleScreenReaderMode was async in implementation but not interface so I've aligned both to be async.
1e71c4c to
c31a232
Compare
Contributor
Author
|
@riknoll would be great to get this one in if possible. |
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes the editor’s Screen Reader Mode toggle via the iframe message API and reports the current state in the info response, aligning the project view API to reflect that the underlying implementation is async.
Changes:
- Route the Settings menu and Blockly shortcut toggles through
toggleScreenReaderModeAsync(...)inProjectView. - Add
togglescreenreadermodeas an editor message and includescreenReaderModein theinforesponse. - Update
IProjectViewtypings to includetoggleScreenReaderModeAsync(...)andisScreenReaderModeEnabled().
Show a summary per file
| File | Description |
|---|---|
| webapp/src/container.tsx | Update Settings menu screen reader toggle to call the async project view method. |
| webapp/src/blocks.tsx | Update Blockly screen reader shortcut handler to call the async project view method. |
| webapp/src/app.tsx | Rename/adjust project view screen reader toggle to async method and add state getter. |
| pxteditor/editorcontroller.ts | Add new togglescreenreadermode message handling and report state via info. |
| localtypings/pxteditor.d.ts | Extend iframe message/action and project view typings to include the new API surface. |
Review details
- Files reviewed: 4/5 changed files
- Comments generated: 3
- Review effort level: Low
riknoll
approved these changes
Jul 10, 2026
Contributor
Author
|
Thanks @riknoll. No worries if this doesn't make the release so long as it can be ported across soon. |
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.
Adds a "togglescreenreadermode" editor message that behaves like the settings menu toggle (including the "settings" telemetry event source), and reports the current state via a new screenReaderMode field on the "info" response.
As part of this change I realised that toggleScreenReaderMode was async in implementation but not interface so I've aligned both to be async.
Needed for micro:bit classroom to expose the same setting.
I'm hopeful that this is our last change!