Accessibility: list Columns pills use aria-checked on role="button" (axe aria-allowed-attr)

Open Beginner friendly
#19,833 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript

Research direction

Start in the @payloadcms/ui package used by the admin list view and search for the Columns pill markup, especially where aria-checked is set. Decide whether the control should be a toggle button with aria-pressed or keep checked state with role="checkbox"/switch, then update the component. Done when the Columns control still toggles columns and axe's aria-allowed-attr violation no longer fires; the issue gives the reproduction path (open a collection list, click Columns, run axe).

Written by the indexing model from the issue text.

Description

Bug Payload OSS

Payload version: 3.91.0 (@payloadcms/ui, @payloadcms/next, @payloadcms/richtext-lexical 3.91.0), Next.js 16.4.2, @payloadcms/db-postgres. The same component code is unchanged in the published 3.94.1 packages (checked by inspecting dist, not by running 3.94.1).

How found: axe-core via @axe-core/playwright (default rules), on the admin with seeded content, signed in as an admin, 1600×900.

Rule: aria-allowed-attr (critical). WCAG 2.2 SC 4.1.2.

In a list view, opening Columns shows the column pills as:

<button role="button" tabindex="0" aria-disabled="false" aria-roledescription="sortable" aria-describedby="..." aria-checked="true" class="pill ...">

aria-checked is not allowed on role="button", so the on/off state of each column is not conveyed reliably.

Steps: open any collection list, click Columns, run axe.

Expected: aria-pressed on a toggle button (or role="checkbox"/switch if aria-checked is kept).

Dominant language
TypeScript
Stars
45.8k
Forks
4.4k
Avg merge
3d 4h
Merged PRs (30d)
210

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from payloadcms/payload

All issues in payloadcms/payload

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.