Skip to content

audit: JS-tabbed pages — only the initial view is rendered, and hidden panes still get contrast-scored (Lc 0 noise) #11

Description

@rz1989s

What

Auditing a hash-routed tabbed page (5 tab-panes, only one display:block at a time):

  1. Only the initial tab is audited. The 4 hidden panes never render — their layout/overflow/contrast issues are invisible to the audit. For tabbed docs/SPAs the audit silently covers ~20% of the page.
  2. Hidden panes still produce contrast findings. The report contains rows like span: APCA Lc 0 < 60 / Lc 2 / Lc 5 — consistent with measuring text in display:none subtrees against the wrong background (Lc ~0 = fg/bg compute to the same lightness, or measurement of unpainted elements). This is noise that buries real findings.

Repro

node engine/audit.mjs <page-with-js-tabs>.html --out . — page uses .tab-pane{display:none} .tab-pane.active{display:block} + hash routing.

Suggestions

  • Skip contrast checks on elements with a display:none ancestor (visibility-aware traversal)
  • View coverage for tabbed pages, pick any:
    • accept #fragment in path mode (load file://…#flow2 so hash-routed pages work)
    • --view-script <path> executed before each screenshot pass
    • auto-detect [data-tab-view] / .tab-pane targets and render one screenshot set per view, reporting per-view gates
  • Report should state which views were audited (coverage honesty — analogous to test coverage)

Environment

keystone @getpipher/keystone (pi npm install), engine/audit.mjs path mode, 2026-08-30 run on a 5-tab architecture diagram.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions