Repository navigation
fix(frontend): give the icon links and small dialogs accessible names - #612
Merged
Merged
Conversation
Found with Safari's accessibility audit. The GitHub, Twitter and mail links in the About dialog only contained an aria-hidden icon, so they had no name. The three full screen dialogs for small screens used a Typography instead of DialogTitle and had no accessible name. MUI applies the aria-label of a Dialog to its root, so it is set on the paper through slotProps. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Visit the preview URL for this PR (updated for commit c43fec4): https://tormap-36f44--pr612-fix-frontend-a11y-di-nz16lk4f.web.app (expires Wed, 11 Nov 2026 20:38:38 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
Two accessibility gaps, found by reviewing the frontend against Safari's built-in accessibility audit (
testForLinkLabels,testDialogsForLabels):aria-hiddenMUI icon, so a screen reader announced them as just "link".ExternalLinkgets an optionalariaLabel, and the three links now haveTorMap on GitHub,TorMap on TwitterandEmail TorMap.Typographyinstead ofDialogTitle, so they hadrole="dialog"without a name. They now havearia-label("Settings", "Families", "Relay details" / "Relays"). The large-screen dialogs useDialogTitleand were already labelled.MUI applies
aria-labelon aDialogto its root element, not to therole="dialog"paper, so it is set throughslotProps.paper. A first attempt on the root was caught by the new tests.Verification
tsc,eslintandyarn test:runpass (281 tests, 6 new): every dialog is found by role with its accessible name on both screen sizes, and the three links are found by name with the righthref.Not verified: I could not run Safari's audit itself (the
WebInspectorAuditAPI only exists inside Safari). If the audit still reports something, the failing test name and element would tell what is left.Dependencies / deployment
None.
🤖 Generated with Claude Code