Repository navigation
Conversation
The ModalContainer carries role="dialog" but no aria-label or aria-labelledby, so assistive technology announced every ConnectKit screen as an unnamed dialog. Label it with the same heading text the modal already renders for the current route, through the flattenChildren pattern the close, back and info buttons use. Fixes family#520
|
@owenpkent is attempting to deploy a commit to the Aave Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
Friendly ping: the CI runs on this PR were waiting for maintainer approval and timed out before anyone approved them, so they never ran. The branch is still current with main. Could someone take a look when you get a chance? I can push to re-trigger CI if that helps. |
This branch has not been deployed
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.
Fixes #520.
What
ModalContainerrenders withrole="dialog"but noaria-labeloraria-labelledby, so every ConnectKit screen was announced as an unnamed dialog. This labels it with the heading text the modal already renders for the current route, using the sameflattenChildren(...).toString()conversion the close, back and info buttons use for theiraria-label.The name follows the route: "Connect Wallet", "Connected", "Switch Networks", the wallet's name on the connecting screen, and so on. When
getHeading()has nothing for a route the attribute is omitted rather than set to an empty string.I went with
aria-labelrather thanaria-labelledbybecause the heading is rendered insideAnimatePresence, so two heading nodes exist during a route transition and an id could not be kept unique.Testing
rollup --config rollup.config.prod.jsbuilds, and the changed file is Prettier-clean. The package has no test suite, andyarn linthas no ESLint config to run against, so I could not add an automated check here.aria-dialog-namewent from 3 occurrences (connect, profile and wrong-network dialogs) to 0, with no other finding changed.