Skip to content

fix(a11y): add accessible labels to seed comment form controls - #1

Open
olitreadwell wants to merge 1 commit into
edgefrom
fix/seed-comment-form-labels
Open

fix(a11y): add accessible labels to seed comment form controls#1
olitreadwell wants to merge 1 commit into
edgefrom
fix/seed-comment-form-labels

Conversation

@olitreadwell

@olitreadwell olitreadwell commented Aug 26, 2026

Copy link
Copy Markdown
Owner

What changed

  • Adds accessible labels to the seed comment textarea and the CSV upload input in the conversation admin.
  • Adds jest-axe accessibility tests for the seed comment form.
  • Adds jest-axe as a devDependency in client-admin.

Why

  • The seed comment textarea and the CSV file input had no accessible name.
  • A screen reader user heard "edit" with no hint about what the field is for.
  • Verified with axe before coding: the form raised a "Form elements must have labels" violation.
  • After the fix the same axe run is silent.
  • This is the kind of gap issue Add automated accessibility tests (jest-axe + cypress-axe) compdemocracy/polis#2690 asks the project to cover.

How to verify

git fetch https://github.com/olitreadwell/polis.git fix/seed-comment-form-labels
git checkout FETCH_HEAD
cd client-admin
npm ci
npm run test:coverage
npm run lint
  • The new jest-axe test "has no axe violations" fails before the fix and passes after.
  • Full client-admin suite passes: 305 tests.
  • GitHub Actions on this fork are not yet enabled, so no check runs on this PR yet. The change was verified locally: client-admin jest suite (305 tests), eslint, and prettier all pass.

AI assistance

Drafted with AI assistance. The gap was found and verified against the current code with axe, the change was verified before opening, and the diff was reviewed line by line.


PROMOTION NOTE (remove this section before/when opening against upstream):

Open the compare view to create the upstream PR (scoped to this branch):

compdemocracy/polis@edge...olitreadwell:polis:fix/seed-comment-form-labels

Or via CLI:

gh pr create --repo compdemocracy/polis --base edge --head olitreadwell:fix/seed-comment-form-labels --title "fix(a11y): add accessible labels to seed comment form controls"

@olitreadwell
olitreadwell force-pushed the fix/seed-comment-form-labels branch from 82205e7 to ede14cd Compare August 26, 2026 11:03
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.

1 participant