Repository navigation
Home page: name the symbol-only buttons in words - #201
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
renderPaginationControls()): the arrow buttons arearia-labelled "First page", "Previous page", "Next page" and "Last page", with the glyph in anaria-hiddenspan (thetitletooltips stay). Number buttons are "Page N" and keeparia-current.aria-label="Details for <package>"andaria-expandedset fromisExpanded, glyph in anaria-hiddenspan. 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-iconspans, on the ⚡ in.omni-badge(now in its own span) and on#omni-toggle-icon.aria-pressed, set ininitTheme()on load and on each click (oneapply()now does both).How it was tested
tests/site/app.test.js: the names of every pagination button in both pagers on pages 1 and 5, the row button's name andaria-expandedbefore and after expanding and collapsing, escaping of a hostile package name in that label, the theme toggle'saria-pressedon load (stored light, stored dark, system dark) and after clicks, and the staticindex.htmlattributes. All seven fail withsite/reverted._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 flipsaria-expandedon click; the theme toggle'saria-pressedfollows the theme on load and after each click; no console errors.Not checked with a real screen reader.
🤖 Generated with Claude Code