Skip to content

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

Closed

Description

@patrickballard

Several controls on the home page are named only by a symbol or an emoji, so a screen reader reads out the symbol's Unicode name ("black right-pointing triangle", "bar chart") or a label that never changes:

  • Pagination arrows. renderPaginationControls() in site/app.js renders ⏮ ◀ ▶ ⏭ buttons with title="First page" and so on. A button takes its accessible name from its content first, so the title only becomes a description, and the name is the glyph. The page number buttons are read as a bare "2, button".
  • Row expand buttons. Every row of the gaps table has <button class="row-expand-btn" aria-label="Toggle details">▲/▼</button>. That's 25 identical "Toggle details" buttons, none naming its package, and none with aria-expanded to say whether its details are open.
  • Export dialog tiles. In site/index.html, the .tile-icon spans holding 📊, 📄 and 🌐 aren't aria-hidden, so each tile's name starts with the emoji's name. The fourth tile (📈) already has aria-hidden="true".
  • Checker header. The "⚡ Instant Checker" badge (.omni-badge) and the ▲/▼ in #omni-toggle-icon (set in the omni-toggle-btn click handler) are read aloud. The toggle button already has text ("Minimize"/"Expand") and aria-expanded, so the arrow adds nothing.
  • Theme toggle. #theme-toggle is aria-label="Toggle theme" whichever theme is on, and initTheme() only swaps the sun and moon icons. A screen reader user can't tell which theme they're on.

What to do

  • Pagination: give the arrow buttons aria-labels ("First page", "Previous page", "Next page", "Last page"; you can drop the titles or keep them) and the number buttons aria-label="Page N". Keep aria-current="page" on the current one.
  • Row expand: put the glyph in an aria-hidden span, label the button with its package (e.g. aria-label="Details for numpy"), and set aria-expanded from isExpanded.
  • Add aria-hidden="true" to the three remaining .tile-icon spans, to the ⚡ in .omni-badge (wrap it in a span), and to #omni-toggle-icon.
  • Theme toggle: make it a toggle button with a fixed name and a state, e.g. aria-label="Dark theme" with aria-pressed="true|false", set in initTheme() and in its click handler.

Done when:

  • In the browser devtools' Accessibility pane, the pagination buttons are named "First page", "Previous page", "Page 1", "Page 2", …, "Next page" and "Last page".
  • Each row expand button's name includes its package, and its aria-expanded matches whether the row's details are open.
  • None of the export tiles' names starts with an emoji name, and the checker's heading and toggle don't include "⚡", "▲" or "▼".
  • The theme toggle's aria-pressed is "true" in dark mode and "false" in light mode, both on load and after a click.
  • Tests in tests/site/app.test.js (the loadPage() helper) cover the pagination labels, the row button's aria-expanded, and the theme toggle's aria-pressed.

Activity

  1. added
    accessibility
    good first issue
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilitygood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions