Skip to content

Home page: name the symbol-only buttons in words - #201

Merged
patrickballard merged 1 commit into
mainfrom
a11y/home-button-names-178
Nov 21, 2026
Merged

patrickballard merged 1 commit into
mainfrom
a11y/home-button-names-178

Conversation

@patrickballard

Copy link
Copy Markdown
Contributor

Closes #178

Several home page controls were named only by a symbol, so a screen reader read the glyph's Unicode name, or a label that never changed.

What changed

  • Pagination (renderPaginationControls()): the arrow buttons are aria-labelled "First page", "Previous page", "Next page" and "Last page", with the glyph in an aria-hidden span (the title tooltips stay). Number buttons are "Page N" and keep aria-current.
  • Row expand buttons: aria-label="Details for <package>" and aria-expanded set from isExpanded, glyph in an aria-hidden span. Both are written where the row is rendered, so they survive every re-render.
  • site/index.html: aria-hidden="true" on the three remaining .tile-icon spans, on the ⚡ in .omni-badge (now in its own span) and on #omni-toggle-icon.
  • Theme toggle: fixed name "Dark theme" with aria-pressed, set in initTheme() on load and on each click (one apply() now does both).

How it was tested

  • New tests in tests/site/app.test.js: the names of every pagination button in both pagers on pages 1 and 5, the row button's name and aria-expanded before and after expanding and collapsing, escaping of a hostile package name in that label, the theme toggle's aria-pressed on load (stored light, stored dark, system dark) and after clicks, and the static index.html attributes. All seven fail with site/ reverted.
  • Built _site/ as the README says and checked the home page in a browser: the accessibility tree lists "First page", "Previous page", "Page 1" … "Page 24", "Next page", "Last page" in both pagers, also after moving to page 3; a row button reads "Details for scikit-learn" and flips aria-expanded on click; the theme toggle's aria-pressed follows the theme on load and after each click; no console errors.
  • The full Check workflow commands pass locally.

Not checked with a real screen reader.

🤖 Generated with Claude Code

The pagination arrows, row detail buttons, export tiles, checker header and theme toggle were read out as the glyph's Unicode name or a label that never changed. The arrows and page numbers get aria-labels, each row button names its package and carries aria-expanded, the decorative symbols are aria-hidden, and the theme toggle is a "Dark theme" toggle button with aria-pressed.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@patrickballard
patrickballard merged commit 44e465e into main Nov 21, 2026
1 check passed
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.

Home page: buttons named only by a symbol (pagination arrows, row toggles, export tiles, theme toggle)

1 participant