Skip to content

feat(workspace-search): Add screen reader support - #10316

Open
mikeharv wants to merge 2 commits into
RaspberryPiFoundation:mainfrom
mikeharv:workspace-search
Open

feat(workspace-search): Add screen reader support#10316
mikeharv wants to merge 2 commits into
RaspberryPiFoundation:mainfrom
mikeharv:workspace-search

Conversation

@mikeharv

Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes #10324

Proposed Changes

Add screen reader support to @blockly/plugin-workspace-search:

  • Marked the search bar as a search landmark and use a search input
  • Localized aria-labels on the input (including instructions around keyboard usage) and buttons
  • Live-region announcements for the current match and for no matches

Initial:
image
After typing search term (matches found):
image
Pressing Enter to cycle matches:
image
Pressing Escape to focus matched block:
image
No matching blocks:
image

Core changes:

  • Added Role.SEARCH to Aria utils and WORKSPACE_SEARCH_* messages

Test Coverage

Unit tests cover attributes, names, and announcements.

Documentation

Updated the plugin readme to add how Escape changes focus.

@mikeharv
mikeharv requested a review from a team as a code owner August 24, 2026 17:35
@mikeharv
mikeharv requested a review from maribethb August 24, 2026 17:35
@github-actions github-actions Bot added the PR: feature Adds a feature label Aug 24, 2026
this.searchAndHighlight(this.searchText);
if (this.inputElement) {
this.inputElement.value = this.searchText;
this.inputElement.focus();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if you had this take ephemeral focus, could you then update the passive focus in the workspace when the matches are navigated? That would let you get the focus outlines on the matched block. You'd probably still want the live region announcements because a lot of the shortcuts to read blocks don't work when ephemeral focus is taken, but it would probably improve the experience for sighted users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: feature Adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add screen reader support to the workspace search plugin

2 participants