Repository navigation
fix(frontend): label the date slider and give the accordions and stats table valid semantics - #614
Merged
Conversation
…s table valid semantics Found with Lighthouse. The date slider had no accessible name and announced the day index instead of the day. All five accordions shared the ids panel2a-header and panel2a-content, so aria-controls pointed at the wrong region. The statistics table had no row headers. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Visit the preview URL for this PR (updated for commit 01ef4b0): https://tormap-36f44--pr614-fix-frontend-a11y-sl-y2kujegm.web.app (expires Wed, 11 Nov 2026 20:56:16 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 0c1f71965de18e60b0e686b0d0356977fec090dc |
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.
What
Accessibility findings from a Lighthouse run (accessibility score 95):
label, and the "agent accessibility tree" check): the MUISliderhad no accessible name, and a screen reader announced its index. It now hasaria-label="Selected day"andgetAriaValueText, so the selected day (for example2026-10-12) is announced.duplicate-id-aria): all five accordions inAppSettingsandMapStatsusedid="panel2a-header"andaria-controls="panel2a-content", a copy-paste leftover, soaria-controlscould not point at the right region. Every accordion now has its own ids.td-has-header): the label cell of each row is now a row header (<th scope="row">), and the icon and label share that cell. That also makes it a two column table with proper semantics.Verification
Lighthouse 13.4.1 on a local build, desktop preset: accessibility 95 -> 100, no failing accessibility audits and no duplicate ARIA ids.
tsc,eslintandyarn test:runpass (278 tests, 3 new: slider name and value text, unique accordion ids with matching regions, row headers).Not changed on purpose: the checkbox and switch inputs for relay types and flags use their numeric value as
id(0,1,2), which repeats between the two lists. The settings handler readsevent.target.idas the key, so changing it is a separate refactor, and it is not an ARIA reference problem because the inputs are wrapped by their labels.Dependencies / deployment
None.
🤖 Generated with Claude Code