Conversation
carmacleod
approved these changes
Dec 17, 2020
carmacleod
left a comment
Contributor
There was a problem hiding this comment.
Other than fixing up that one id, looks good to me!
Thanks, @scottaohara!
Contributor
|
@cookiecrook I'm guessing that you will enjoy reviewing this one. ;) |
cookiecrook
approved these changes
Dec 18, 2020
Co-authored-by: James Craig <cookiecrook@users.noreply.github.com>
mcking65
requested changes
Jan 3, 2021
mcking65
left a comment
Contributor
There was a problem hiding this comment.
Thank you for the addition!
MelSumner
approved these changes
Jan 7, 2021
Member
|
fixes #758 |
Member
|
Decision in 25-Mar-2021 meeting - no fallback role |
revise the wording per matt’s feedback. Removed the paragraph on fallback per the decision the WG came to in the march 25th call.
Contributor
mcking65
approved these changes
Apr 22, 2021
jnurthen
approved these changes
May 6, 2021
jnurthen
pushed a commit
that referenced
this pull request
May 6, 2021
Co-authored-by: James Craig <cookiecrook@users.noreply.github.com>
Closed
Contributor
12 tasks
Member
Author
|
created a bug with chromium to get this implemented |
chutchins25
added a commit
to dequelabs/axe-core
that referenced
this pull request
Jul 29, 2026
Add a reusable synonym mechanism: the image role is defined as a synonym of img (ARIA 1.3, w3c/aria#1370) and getExplicitRole/getRole resolve synonym roles to their canonical role by default, with a noSynonym opt out. The role-img-alt selector and aria-allowed-role role resolution are updated so role=image behaves like role=img. Closes #4656
chutchins25
added a commit
to dequelabs/axe-core
that referenced
this pull request
Jul 29, 2026
Add the ARIA 1.3 image role (w3c/aria#1370) as an alias of img: it is a valid role sharing img's definition (spread from a common object) and is allowed wherever img is allowed in the html-elms spec (embed, iframe, svg). The role-img-alt selector matches both roles via :is(). This avoids a synonym-resolution mechanism, so the role the author used is preserved when reporting an unallowed role. Closes #4656
straker
added a commit
to dequelabs/axe-core
that referenced
this pull request
Aug 3, 2026
Adds support for `role="image"` as a valid role equivalent to `role="img"` (ARIA 1.3, [w3c/aria#1370](w3c/aria#1370)). ## What & why ARIA 1.3 adds `image` as an alias of `img` with an identical mapping; axe previously treated `role="image"` as an invalid role. Per the review discussion, this does **not** use a synonym-normalization mechanism (which would force every reporting path to remember the role the author used vs. the one our code resolved it to). Instead, `image` is a first-class role that shares `img`'s definition and is allowed wherever `img` is: - `image` is added to `lib/standards/aria-roles.js`, spread from a shared `imgRole` object so it stays in sync with `img`. - `image` is added to every `html-elms` `allowedRoles` list that includes `img` (`embed`, `iframe`, `object`). `svg` needs no change — it is `allowedRoles: true`, so it already accepts any role. - The `role-img-alt` and `svg-img-alt` selectors match both roles via `:is([role='img'], [role='image'])`. Without the `svg-img-alt` change, `<svg role="image">` matched neither rule — `svg-img-alt`'s selector omitted it and `role-img-alt` is gated by `html-namespace-matches` — so axe accepted the role and then never checked for an accessible name. - `image` is added to the `aria-roledescription` check's `supportedRoles`, so `role="image"` passes where `role="img"` does. Because there is no synonym resolution, an unallowed `role="image"` reports **`image`** (the role the author used), not `img`. ## Tests - `is-valid-role` / `aria-roles` integration — `image` is a valid role. - `get-element-unallowed-roles` — `image` allowed on `svg`/`embed`/`object`/`iframe`; reported as authored when unallowed (e.g. on `hr`). - `role-img-alt` integration + virtual-rules — matches `role="image"`. - `svg-img-alt` integration + virtual-rules — matches `role="image"`. - `aria-roledescription` — `role="image"` passes against the check's default `supportedRoles`. - ACT specs `7d6734` and `23a2a8` still pass with the broadened selectors. ## Not in scope `role-img-alt` and `svg-img-alt` metadata still name only `img` in their `description`/`help` strings. Updating them regenerates `locales/_template.json`, invalidates those translations, and needs a matching axe-rule-help change — tracked in #5272. Closes #4656 --------- Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com>
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.
Using
noneas a reference point, created a first draft of theimageentry into the spec.This initial commit only adds the note about why
imageis being added to the newimageentry. Once we are happy with this note, we can add it to theimgsection as well... if we think that's necessary (they do show up right next to each other in the spec, after all).Preview (#image) (#img) | Diff