Skip to content

fix: use referenced names in descriptions - #1099

Open
pupuking723 wants to merge 1 commit into
eps1lon:mainfrom
pupuking723:fix/describedby-referenced-names
Open

fix: use referenced names in descriptions#1099
pupuking723 wants to merge 1 commit into
eps1lon:mainfrom
pupuking723:fix/describedby-referenced-names

Conversation

@pupuking723

Copy link
Copy Markdown

Fixes #1064.

This keeps the aria-describedby referenced subtree in referenced context while computing text alternatives, so descendants with aria-label contribute their accessible name to the computed description instead of falling back to raw text content.

It also updates the existing WPT expectations for description_from_content_of_describedby_element-manual.html from fail to pass.

Verification:

  • yarn test sources/tests/accessible-description.js --runTestsByPath --runInBand
  • yarn test
  • yarn prettier --check sources/accessible-name-and-description.ts sources/tests/accessible-description.js tests/wpt-jsdom/to-run.yaml tests/cypress/integration/web-platform-test.cy.js .changeset/describedby-referenced-names.md
  • yarn lint
  • yarn test:types
  • yarn build

Note: yarn test:wpt:jsdom could not complete locally because initializing the tests/wpt submodule stalled while cloning the upstream WPT repository.

Signed-off-by: 王胜 <2318857637@qq.com>
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.

Aria labels not coming through aria descriptions

1 participant