Repository navigation
Closed
Labels
Description
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()insite/app.jsrenders⏮ ◀ ▶ ⏭buttons withtitle="First page"and so on. A button takes its accessible name from its content first, so thetitleonly 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 witharia-expandedto say whether its details are open. - Export dialog tiles. In
site/index.html, the.tile-iconspans holding 📊, 📄 and 🌐 aren'taria-hidden, so each tile's name starts with the emoji's name. The fourth tile (📈) already hasaria-hidden="true". - Checker header. The "⚡ Instant Checker" badge (
.omni-badge) and the ▲/▼ in#omni-toggle-icon(set in theomni-toggle-btnclick handler) are read aloud. The toggle button already has text ("Minimize"/"Expand") andaria-expanded, so the arrow adds nothing. - Theme toggle.
#theme-toggleisaria-label="Toggle theme"whichever theme is on, andinitTheme()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 thetitles or keep them) and the number buttonsaria-label="Page N". Keeparia-current="page"on the current one. - Row expand: put the glyph in an
aria-hiddenspan, label the button with its package (e.g.aria-label="Details for numpy"), and setaria-expandedfromisExpanded. - Add
aria-hidden="true"to the three remaining.tile-iconspans, 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"witharia-pressed="true|false", set ininitTheme()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-expandedmatches 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-pressedis"true"in dark mode and"false"in light mode, both on load and after a click. - Tests in
tests/site/app.test.js(theloadPage()helper) cover the pagination labels, the row button'saria-expanded, and the theme toggle'saria-pressed.
Activity