Repository navigation
fix(rules): a CSS-nesting rule that may hide an element reads unknown, with Chromium rows #1013 - #1022
fix(rules): a CSS-nesting rule that may hide an element reads unknown, with Chromium rows #1013#1022nc9 wants to merge 2 commits into
Conversation
|
Reviewed the diff. It only changes docs, the Chromium fixture, one test file and the changelog. The reader change is in #1020, so I didn't review it here. I haven't run the tests. No blocking issues. Findings:
|
…, with Chromium rows #1013 Signed-off-by: Nik Cubrilovic <[email protected]>
f72d006 to
34b324e
Compare
Signed-off-by: Nik Cubrilovic <[email protected]>
|
Reviewed the diff (CHANGELOG, 7 a11y docs pages, the new Chromium fixture rows, and the new tests in
Otherwise the docs wording and CHANGELOG entry are consistent, and the tradeoff is documented. No blocking issues. |
|
Review of #1022 (tests, fixture and docs on top of #1020). I only read the diff. I did not run the tests or check the Chromium rows.
The invariant is the right one (never |
… as unknown, never shown (#1015) (#1020) Every give-up path of readPageStyles (rule cap, over-size block, long selector, entry cap, non-ASCII space, nested rule) now answers unknown for every element; nested rules are covered (#1013 evidence follows in #1022). Over-cap pages get their naming checks unconfirmed instead of failing; narrowing is tracked in #1027. Closes #1015. Signed-off-by: Nik Cubrilovic <[email protected]>
Repro and the nesting shapes from #1014 by @dbdefault.
Stacked on #1020 (base branch
fix/1015-style-rule-cap; GitHub retargets it to main when #1020 merges). The reader code change for this issue is #1020's: a rule nested inside a style rule made the reader give up, and giving up now reads every element asunknown, nevershown. This PR adds what #1013 asks for on top: the Chromium evidence, the invariant test and the docs.packages/rules/tests/fixtures/static-hidden-chromium.json: 13nesting:rows, each rendered in headless Chromium at 1024px (the repro,@supports,&with a descendant, implicit&,&alone, a hiding outer rule beside a nested one, a nested sibling combinator, nestedvisibility, nesting inside an at-rule, and the four shown cases: nested rule that sets neither property,&:hover, a nested rule reaching another element, a false nested@media).packages/rules/tests/static-hidden.test.ts: a new invariant, nevershownwhere Chromium hides anesting:element (all 9 hidden rows; they fail without fix(rules): a page past the style reader's limits reads elements as unknown, not shown #1015 #1020), plus a nested rule that sets neither property keepsshownand an unnested rule keepshidden. The existing "never hidden where Chromium shows" invariant covers the 4 shown rows.Tests: static-hidden 371 pass (11 fail with #1020's change reverted);
tsgoclean in packages/rules;tangly check --strictclean. Rows were generated with headless Chromium (script kept in ops scratch, not committed).Tradeoff, same as #1020: the reader does not narrow nested rules to the elements they reach, so a page with a nested
display/visibilityrule reads all its elements as unconfirmed.Agent skill (
squirrelscan/skills): not needed.Closes #1013