Repository navigation
Description
Summary. a11y/aria-hidden-focus and a11y/button-name do not evaluate hiding that comes from <style> rules, so a control hidden by a document stylesheet (display:none or visibility:hidden) is still reported. Follow-up to #664 criterion 1 and #665. The first fix (pub#675) decides hiding from markup and plainly written inline styles only, because reading stylesheets in HTTP mode turned out to be a minefield: a false "hidden" silently drops a real accessibility failure.
Prior work. A cascade-engine attempt (selector matcher, cascade, nesting handling) is parked on the branch wip/static-hidden-cascade-664-665 at ee5a5d6. Review against headless Chromium (getComputedStyle) still found about 15 of 80 adversarial rows where it said "hidden" and Chromium shows the control: unquoted url() forms, (/[/function groups inside a block, an unknown pseudo-class not voiding its selector list, :matches(), the s attribute flag, <style type=" text/css "> untrimmed, and NBSP in a selector. A 97 to 109 row Chromium-verified fixture exists at packages/rules/tests/fixtures/static-hidden-chromium.json (from pub#675) and is the guard for any attempt.
Known limitations of the markup-only version. External stylesheets and <style> rules are not read: delife.bg's Bootstrap .modal and the BBC language dropdown still report. A nested CSS rule setting display made every verdict on the page "unconfirmed" in the engine attempt (Tailwind v4 responsive variants), so any engine needs a narrower rule than page-wide.
Acceptance Criteria
- a11y/aria-hidden-focus: CSS-hidden descendants reported as focusable in HTTP mode #664's
display-noneandvisibility-hiddenfixtures and a11y/button-name: hidden controls reported as unnamed buttons #665'scssfixture pass (the hidden control is not reported). - No row of the Chromium-verified fixture, nor review's adversarial rows, returns "hidden" where Chromium shows the control; anything undecidable resolves to "unconfirmed".
- Stylesheet parsing is bounded on hostile input: input size, rule count, selector length, nesting, per-match and per-page steps, and memory (an 11 KB nested stylesheet must stay near baseline RSS).
- Off-screen, transparent and disabled controls are still checked.
- The score effect is stated: a hidden control goes from fail to pass, an unconfirmed one from fail to warn, nothing that passed before newly warns or fails unless Chromium confirms the control is actually shown or the rule cannot be decided.
Activity
fix(rules): five accessible-name rules skip controls out of the acces…
fix(rules): drop CDO/CDC with string checks; fuzz the <style> reader #…
fix(rules): a11y hidden-control checks read decidable <style> rules s…