Skip to content

feat(rules): scope a11y/paste-inputs to authentication fields and map it to WCAG 3.3.8 #2106 - #2178

Merged
nc9 merged 3 commits into
mainfrom
boat/paste-inputs-auth-2106
Nov 21, 2026
Merged

nc9 merged 3 commits into
mainfrom
boat/paste-inputs-auth-2106

Conversation

@nc9

@nc9 nc9 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Closes #2106

Summary

a11y/paste-inputs now reports paste blocking on authentication fields only, so it can carry WCAG 2.2 success criterion 3.3.8 Accessible Authentication (Minimum) instead of wcagNone.

  • An authentication field is an <input type="password">, or any <input>/<textarea> whose autocomplete includes current-password, new-password or one-time-code (non-text input types such as hidden and submit are skipped).
  • Only onpaste blocking is reported. Paste, copy or cut blocking on any other field (a "confirm email" field, for example), and copy or cut blocking on a password field, is not reported. The rule page says so.
  • meta.wcag = [wcag("3.3.8")] (AA, WCAG 2.2), so --wcag-level AA now keeps the rule. Severity, weight, check name and scopes are unchanged.
  • Fail items now read password (type=password) or code (autocomplete=one-time-code). Info message changes to No password or one-time-code fields found (audit-engine golden regenerated; this changes the info check's pinned digest).
  • Docs: rule page (title, description, What squirrel checks, regenerated WCAG block), a11y hub row, glossary backlink and the autocomplete-tokens related-rule line.
  • Changelog: changelog.d/2106-paste-inputs-auth-fields.changed.md.

Design choice: the issue allowed narrowing or splitting. WCAG tags are per rule, not per check, so a split would need a new rule; the issue title asks to scope the rule, so this narrows it and stops reporting non-authentication fields.

Acceptance criteria

  • Paste blocking on a password or one-time-code field (one-time-code, current-password, new-password) is reported and tagged 3.3.8: a11y-paste-inputs-2106.test.ts "a password field that blocks paste fails" and the autocomplete="%s" cases; a11y-wcag.test.ts "paste-inputs cites 3.3.8 Accessible Authentication (Minimum) at AA".
  • Other fields are not reported, and the rule page says so: test 'a "confirm email" field that blocks paste is not reported', "copy or cut blocking on a password field is not reported"; docs/rules/a11y/paste-inputs.mdx What squirrel checks paragraph.
  • Tests cover a password field, a code field and a "confirm email" field: packages/rules/tests/a11y-paste-inputs-2106.test.ts.
  • The rule page and generated WCAG line match: bun scripts/rule-wcag.ts --write regenerated the 3.3.8 table; make validate in docs passes.

Gates

  • bun test packages/rules/tests/a11y-paste-inputs-2106.test.ts packages/rules/tests/a11y-wcag.test.ts: 26 pass, 0 fail
  • bun run scripts/test-suites.ts --run rules: 12528 pass, 24 todo, 0 fail
  • bun run scripts/test-suites.ts --run audit-engine: 2366 pass, 3 skip, 0 fail
  • bun run scripts/test-suites.ts --run rest: 3907 pass, 0 fail
  • docs-reading code tests (docs-rule-pages, docs-category-table, mcp/docs-sync): 13 pass
  • make validate (docs): all checks pass, 71 script tests pass
  • bun run scripts/test-suites.ts --check, root format:check, root lint, packages/rules typecheck: pass
  • bun scripts/changelog.ts check: OK

Agent skill

No change needed to the squirrelscan agent skill: rule id, check name and options are unchanged.

@nc9
nc9 marked this pull request as ready for review November 20, 2026 22:15
nc9 added 2 commits November 21, 2026 11:42
* origin/main:
  test(audit-engine): carriedCheckAsFailure keeps the continuation mark #2098 (#2166)
  fix(rules): correct zoom-disabled 1.4.4 wording, related criteria for wcagNone rules #2115 (#2174)
  refactor(cli): list bash completion flags one per line #2116 (#2175)
  feat(rules): waive a public Supabase table by bare name in security/supabase-rls #2103 (#2177)
  test(rules): every site rule emits a check on a clean site, with a shrinking baseline #1741 (#2179)
  feat(rules): report each 5xx page as its own crawl/server-errors finding #2130 (#2181)
  fix(rules): one finding per leaked field across json-sensitive-fields and auth-endpoint-disclosure, deduped by the runner #2083 (#2154)
  fix(cli): report --input keeps meta.partialAudit and publishes with it #2102 (#2153)
  fix(cli): local incremental re-audit counts carried findings in the full audit's check units (#2159)
  fix(crawler): cap stored entity refs and edges, skip corrupt refs rows #2135 (#2158)
  fix(crawler): a quick crawl fetches the start URL when a sitemap lists it past maxPages #2127 (#2157)
  fix(rules): security/exposed-actuator reads a 5xx through isUnverifiedReply, never part of a pass #2101 (#2151)
  fix(rules): hold large text to 3:1 in a11y/color-contrast #2105 (#2155)
  fix(cli): size the report list date column from rendered dates #2095 (#2152)

Signed-off-by: Nik Cubrilovic <[email protected]>
* origin/main:
  fix(rules): links/anchor-mismatch false positives on translated stores #2092 (#2162)
  fix(rules): coded gap skips for input not fully checked, batch 2 rules #2134 (#2163)

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 merged commit 952bd4b into main Nov 21, 2026
8 of 15 checks passed
@nc9
nc9 deleted the boat/paste-inputs-auth-2106 branch November 21, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

a11y/paste-inputs: scope paste blocking to authentication fields so it can carry WCAG 3.3.8

1 participant