Skip to content

Conversation

@BenHenning
Copy link
Contributor

@BenHenning BenHenning commented Oct 30, 2025

The basics

The details

Resolves

Fixes #9304

Proposed Changes

Adds relevant aria-owns properties to ensure that all focusable accessibility nodes have the correct parent/child relationships (particularly for blocks).

Reason for Changes

Other PRs have made progress on removing extraneous accessibility nodes with #9446 being essentially the last of these. Ensuring that parent/child relationships are correct is the last step in ensuring that the entirety of the accessibility node graph is correctly representing the DOM and navigational structure of Blockly.

This can have implications and (ideally) improvements for certain screen reader modes that provide higher-level summarization and sometimes navigation (bypassing Blockly's keyboard navigation) since it avoids an incorrect flat node structure and instead ensures correct hierarchy and ordering.

Test Coverage

No automated tests are needed for this since it's experimental. However, manual testing involved adding various types of blocks and fields plus icons and mutators to ensure that relevant elements were correctly owned.

Documentation

No documentation changes are needed for these experimental changes.

Additional Information

Note that there are some limitations with this approach: text editors and listboxes (e.g. for comboboxes) are generally outside of the hierarchy represented by the Blockly workspace. This is an existing issue that remains unaffected by these changes, and fixing it to be both ARIA compliant and consistent with the DOM may not be possible (though it doesn't seem like there's a strong requirement to maintain DOM and accessibility node tree hierarchical relationships).

This is likely the cause of certain "region end"-esque announcements and may require additional investigation and work. It's considered outside the scope of this PR and #9304.

Finally, the changes here are rather ugly and would benefit from some more careful long-term technical design considerations (a la #9307).

@google-cla
Copy link

google-cla bot commented Oct 30, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added the PR: fix Fixes a bug label Oct 30, 2025
@BenHenning BenHenning changed the base branch from develop to add-screen-reader-support-experimental October 30, 2025 00:44
@github-actions github-actions bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Oct 30, 2025
@BenHenning
Copy link
Contributor Author

Looks like there's some CI failures to address. Moreover I haven't completed in-depth testing of the hierarchy--I want to check more block and fields types before considering this ready for review.

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

Labels

PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit and reduce complexity of accessibility node tree

1 participant