Skip to content

a11y style reader: a page over the 5000-rule cap reads hidden elements as shown instead of unknown #1015

Closed

Description

@nc9

Summary

readPageStyles (packages/rules/src/shared/page-styles.ts ~758) returns INCOMPLETE once a page has 5000 or more style rules (MAX_RULES). An element hidden by 5000 flat .a{display:none} rules then reads as shown (so its unnamed controls can FAIL), while at 4900 rules it correctly reads hidden. An incomplete read should be unknown (unconfirmed), never shown. Found while reviewing #1012; present on main.

Acceptance Criteria

  • A page whose style rules exceed the cap answers unknown for any element a style rule could hide, never shown
  • A test covers 4,900, 5,000 and 5,100 flat hiding rules and asserts hidden, unknown, unknown
  • The affected naming rules report <check>-unconfirmed (not a fail) on the over-cap page
  • Reading time on the over-cap page stays within a few ms (no new quadratic work)
  • CHANGELOG entry; docs "What squirrel can see" mention the rule cap

Activity

  1. added
    bug
    size: S
    rules
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrulessize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions