fix: accname related role edge cases#54
Merged
drwpow merged 1 commit intodrwpow:mainfrom Apr 18, 2025
jlp-craigmorten:fix-accname-edgecases
Merged
fix: accname related role edge cases#54drwpow merged 1 commit intodrwpow:mainfrom jlp-craigmorten:fix-accname-edgecases
drwpow merged 1 commit intodrwpow:mainfrom
jlp-craigmorten:fix-accname-edgecases
Conversation
🦋 Changeset detectedLatest commit: 297c359 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
drwpow
reviewed
Apr 18, 2025
Merged
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.
Changes
Relates to #25
imgelement mappings now preferimagerole overimg, see the note in https://www.w3.org/TR/html-aam-1.0/#el-img r.e. preferred synonym for WAI-ARIA 1.3imgelement with noaltattribute (i.e. missing completely) has a role ofimage, see https://www.w3.org/TR/html-aam-1.0/#el-imgimgelement with emptyalthas a role ofnoneprovided theimgdoes not have an accname provided by other means (e.g.aria-label), see https://www.w3.org/TR/html-aam-1.0/#el-img-empty-altaria-labelshould be trimmed of whitespace when calculating accname, see https://www.w3.org/TR/accname-1.2/#computation-steps (specifically section 2.4 of the algorithm)titleshould be considered when calculating accname, see https://www.w3.org/TR/accname-1.2/#computation-steps (specifically section 2.5 of the algorithm) for the core calculation and see https://www.w3.org/TR/html-aam-1.0/#el-img-name for theimgspecific name calculationHow to Review
This change was prompted by the following failing test cases taken from the WPT roles-contextual.html suite:
This change does not cover the following known failures:
These would require a more accurate ACCNAME algorithm implementation for the first two, and supporting an involved algorithm to scan all rows in a table to support
rowheaderwhenscopeisauto.Checklist