Skip to content

fix(aria): split role and attribute selector lists on ASCII whitespace - #43365

Closed
Alok Pandey (alok-108) wants to merge 1 commit into
microsoft:mainfrom
alok-108:fix-role-ascii-whitespace
Closed

Alok Pandey (alok-108) wants to merge 1 commit into
microsoft:mainfrom
alok-108:fix-role-ascii-whitespace

Conversation

@alok-108

Copy link
Copy Markdown
Contributor

Summary

  • Split explicit role attributes and ~= attribute selectors on ASCII whitespace per WAI-ARIA and CSS specifications.
  • Extend existing role and selector tests with tab and newline whitespace.

@alok-108

Alok Pandey (alok-108) commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Hey Yury Semikhatsky (@yury-s), saw your fix in #43361 for getIdRefs and noticed we still had .split(' ') hanging around in getExplicitAriaRole and the ~= attribute matcher.

Both WAI-ARIA (§7.3) and CSS specs say fallback roles and ~= tokens should split on any ASCII whitespace (tabs and newlines as well), so I aligned them with the regex you used in getIdRefs and extended the existing role & selector tests.

Let me know what you think!

@alok-108
Alok Pandey (alok-108) deleted the fix-role-ascii-whitespace branch October 16, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants