Repository navigation
FIx: inverted logic in a11y-no-redundant-roles rule - #17067
Conversation
🦋 Changeset detectedLatest commit: 145b267 The changes in this PR will be included in the next version bump. This PR includes changesets to release 393 packages
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 |
e2ba6af to
f3351a5
Compare
|
Thanks for taking this on (I filed #17062). The inversion and selector fix look right. One thing potentially worth handling before it lands: the rule reads the static
It also reproduces against your own tests: adding those three elements to Covering these would need attribute/context-aware role resolution, or narrowing the rule to elements whose implicit role is unconditional. Adding these cases to the valid fixture would lock in that boundary. |
|
@chippleh1392 san, |
| const type = element.getAttribute('type') || 'text'; | ||
| const implicitRoleForType = input_type_to_implicit_role.get(type); | ||
|
|
||
| // If the input type doesn't have an implicit role, then it can take any role without being redundant |
| // No need to check if the role is valid, as that is covered by another rule | ||
| if (!role) return false; |
There was a problem hiding this comment.
The comment is not correct; this isn't what the code is doing. It's just checking if it doesn't exist. The comment should be removed
I've investigate about this for serach W3C(https://www.w3.org/TR/html-aria/). |
f3351a5 to
145b267
Compare
|
@ematipico san, @chippleh1392 san Could you check this if you are available? Thank you. |
ematipico
left a comment
There was a problem hiding this comment.
@fkatsuhiro are you still interested in finishing up the PR?
| --- | ||
| --- | ||
|
|
ematipico
left a comment
There was a problem hiding this comment.
Didn't notice that the comment was added
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`7.0.3` → `7.0.4`](https://renovatebot.com/diffs/npm/astro/7.0.3/7.0.4) |  |  | --- ### Release Notes <details> <summary>withastro/astro (astro)</summary> ### [`v7.0.4`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#704) [Compare Source](https://github.com/withastro/astro/compare/[email protected]@7.0.4) ##### Patch Changes - [#​17212](withastro/astro#17212) [`7ba0bb1`](withastro/astro@7ba0bb1) Thanks [@​matthewp](https://github.com/matthewp)! - Ensures transition directive values are HTML-escaped when rendered on hydrated islands - [#​17224](withastro/astro#17224) [`dc5e52f`](withastro/astro@dc5e52f) Thanks [@​astrobot-houston](https://github.com/astrobot-houston)! - Fixes trailing slash handling for dynamic file endpoints in dev mode. Dynamic file endpoints (e.g., `src/pages/api/[name].json.ts`) with `trailingSlash: "always"` incorrectly required a trailing slash in dev mode, returning 404 for `/api/bar.json` and 200 for `/api/bar.json/`. - [#​17067](withastro/astro#17067) [`23f9446`](withastro/astro@23f9446) Thanks [@​fkatsuhiro](https://github.com/fkatsuhiro)! - Fixed a bug where the development toolbar did not output a warning even though the implicit ARIA role and the manually specified role were duplicated. - [#​17234](withastro/astro#17234) [`d5fbee8`](withastro/astro@d5fbee8) Thanks [@​ocavue](https://github.com/ocavue)! - Adds support for [`sharp` v0.35](https://github.com/lovell/sharp/releases/tag/v0.35.0). pnpm users no longer need to approve `sharp`'s build script (see [`allowBuilds`](https://pnpm.io/settings#allowbuilds)) when on v0.35. - [#​17223](withastro/astro#17223) [`5970ef4`](withastro/astro@5970ef4) Thanks [@​astrobot-houston](https://github.com/astrobot-houston)! - Fixes `getCollection()` returning empty in dev mode for large content collections (500k+ entries) - [#​17184](withastro/astro#17184) [`799e5cd`](withastro/astro@799e5cd) Thanks [@​Princesseuh](https://github.com/Princesseuh)! - Upgrades the Rust compiler to the latest, which fixes some bugs. Refer to its [changelog](https://github.com/withastro/compiler-rs/releases/tag/%40astrojs%2Fcompiler-rs%400.3.0) for more information. - [#​17208](withastro/astro#17208) [`da8b573`](withastro/astro@da8b573) Thanks [@​matthewp](https://github.com/matthewp)! - Hardens forwarded header handling so the internal request helper validates `X-Forwarded-Host` against `security.allowedDomains` before trusting `X-Forwarded-For` for `clientAddress`. Previously it only checked that the header was present, which was inconsistent with the public `createRequest` helper. This aligns both code paths; behavior is unchanged for correctly configured proxies. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDYuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI0Ni4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->


Changes
selector:[role]:is(${[...a11y_implicit_semantics.keys()].join(',')},input)if (role === implicitRole) return false;) that was causing validation failures to be silently ignored.Testing
Before implementation
After implementation
Docs
Close #17062
Close #15995