Repository navigation
fix(rules): :where()/:is() beside plain parts narrow an a11y style rule's subject #951 - #958
Conversation
|
Reviewed the diff. I found no problems.
I only read the diff. I did not run the tests. |
51f9303 to
8c6de0e
Compare
|
Reviewed the diff for #958. I found no issues, so there are no tagged findings. I only read the diff and did not run the tests.
|
…le's subject #951 Signed-off-by: Nik Cubrilovic <[email protected]>
8c6de0e to
c3da5ba
Compare
|
Review of #958: I found no blocking issues.
|
What
A
:where(),:is(),:has()or:nth-child()beside a tag, class, id or attribute test now only narrows the rule. The a11y<style>reader (shared/page-styles.ts) keeps those plain parts as the rule's subject instead of treating the rule as reaching any element. A bare:where(.a)still reaches every element.Why
Tailwind v4's preflight
[hidden]:where(:not([hidden="until-found"])) { display: none !important }can only match elements withhidden, but it made every unnamed control on the page-unconfirmed(warn) instead of a fail.Also: a hex escape ended by CRLF is now read as one whitespace (found by the codex pass: it would otherwise have turned into a false pass with the narrowed subject).
Elements the rule can reach (
hidden) stay unconfirmed as before, never a failure.Tests
New
page-styles-where-is-951.test.ts(repro, hidden controls, bare:where(), narrowed class rule, CRLF escape). Existing static-hidden, button-name, a11y-name-rules, aria-hidden-focus and hidden-text tests pass.Closes #951
skills: no change