Skip to content

Revisit pa11y color-contrast ignore on form preview pages after nhsuk/govuk frontend bumps #281

Description

@FilisLiu

Context:

The pa11y configs (.github/workflows/pa11y/wcag2aa.js and wcag2aaa.js) currently ignore the color-contrast rule on three URLs: /assistants/new, /components/checkboxes, /components/radios.

This is a false positive, not a real contrast failure: axe cannot determine the background of NHS radio/checkbox labels because the control is drawn with a ::before/::after pseudo element, so it bails out on those labels. The label text itself passes AA contrast comfortably.

Action:

Whenever the nhsuk-frontend / govuk-frontend gems (or the pinned axe/pa11y version) are bumped, remove the ignore, re-run the accessibility suite on those pages, and confirm whether the false positive is gone. If it is, delete the contrastFalsePositivePaths / ignore handling from both config files. If it still fires, keep the ignore and update this ticket.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions