Skip to content

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

Description

@nc9

a11y/paste-inputs (packages/rules/src/a11y/paste-inputs.ts) flags paste blocking on every text, email, tel, url, search and textarea input, and also flags copy and cut blocking (:25-60). WCAG 2.2 success criterion 3.3.8 Accessible Authentication (Minimum) is about authentication: entering a password or a code. pub#2024 therefore leaves this rule unmapped (wcagNone, with a reason) rather than tagging it 3.3.8.

Decide whether to narrow the rule so it can carry 3.3.8, or split it into an authentication part (3.3.8) and a general usability part (no criterion).

Acceptance Criteria

  • Paste blocking on a password field or a one-time-code field (autocomplete="one-time-code", current-password, new-password) is reported, and that check is tagged 3.3.8.
  • Paste, copy or cut blocking on other fields is either reported by a separate check with no WCAG tag, or not reported, and the rule page says which.
  • Tests cover a password field, a code field, and a "confirm email" field.
  • The rule page and the generated WCAG line match the new behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementrulessize: S

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions