Skip to content

fix(rules): inline low-contrast text (#b9b9b9 on near-white) is not reported; color-contrast says "Limited contrast analysis available" #1752

Closed

Description

@nc9

Fault low-contrast-text on the public demo site nutshop.squirrelscan.com (repo squirrelscan/nut-shop): the home page tagline paragraph has style="color:#b9b9b9" on a near-white background (contrast ratio about 2:1, below the WCAG AA 4.5:1). Run 01M759PV7TNEQDYXMRQS4HWTA3 reports a11y/color-contrast check color-contrast with status info, message "Limited contrast analysis available", attached to page /_fault/soft-404, and nothing for /. The accessibility category scores 100 in the run.

Acceptance Criteria

  • An inline color that fails AA against the computed background of its element is reported for the page, with the colors and ratio.
  • When contrast cannot be analysed the info message says what was not analysed (page, reason) and is attached to the audited site, not an arbitrary page.
  • A fixture with #b9b9b9 on white asserts a warning or fail.

Amended 11-12 (after v0.0.179): the second criterion shipped as: the could-not-analyse info names the reasons and the counts of what was not analysed, sits on the page that has the text, and is never attached to an arbitrary page. It is not attached to the audited site: a page rule cannot emit a site-level check without an engine contract change (the engine stamps the page on every page-rule check, and page findings are keyed on it).

Activity

  1. added
    bug
    size: M
    rules
    on Nov 11, 2026
  2. added theissue type on Nov 11, 2026
  3. nc9 commented on Nov 11, 2026

    @nc9
    ContributorAuthor

    Seen again on a later audit of the demo site, and with less output than before.

    Run 01M765CGEC3GA0H37GRZCMM0DW (full, 71 pages audited). The home page serves <p class="lead" style="color:#b9b9b9"> on a near-white background (checked with curl at audit time).

    • a11y/color-contrast is in the report with checks: []: no result of any status for any page. The first report at least had the info row "Limited contrast analysis available".
    • a11y/link-in-text-block also has checks: [] in the same report.
    • The string b9b9b9 does not occur anywhere in the report.

    So the acceptance criteria above should also cover this: a rule that ran on rendered pages and judged nothing says so (the shared not-checked reason), it does not return an empty list that reads as a pass.

    One thing not yet ruled out: the site's client code re-renders the head and parts of the body after hydration (#1769). If the inline style is gone from the rendered DOM by the time of the snapshot, the cause is shared with that issue. The paragraph is in the body, so this needs checking against the snapshot, not assuming.

    nik

  4. nc9 commented on Nov 12, 2026

    @nc9
    ContributorAuthor

    Not closed after v0.0.179 (https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.179). Inline colours are measured against the computed background and the demo tagline case is reported. Still open: the could-not-analyse info is attached to the page, not the audited site. The change that shipped is c397ffb.

    nik

  5. nc9 commented on Nov 12, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.179: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.179

    Acceptance criteria checked against the tag; the change is c397ffb. The second criterion is amended (see the note under the criteria): the could-not-analyse info names the reasons and counts and sits on the page that has the text, because a page rule cannot emit a site-level check without an engine contract change.

    nik

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: M

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions