-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Add missing accessibility aria-modal=true to the Modal and aria-label #588
Fix: Add missing accessibility aria-modal=true to the Modal and aria-label #588
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
18e9545
to
6403472
Compare
52aeeb1
to
d19bcae
Compare
d19bcae
to
6fdadd8
Compare
@alexandrzavalii Thanks for the contribution again! |
I'll add a Cypress test for the new aria label we added. |
@@ -215,6 +220,8 @@ const ModalContent = ({ | |||
handleClose={handleClose} | |||
padding={padding} | |||
transformOrigin={transformOrigin} | |||
aria-modal={true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like aria-modal=true
is supposed to replace the functionality of setting aria-hidden=true
on children, but isn't fully supported yet.
Do you know if this technique will work with multiple modal dialogs stacked? The aria-hidden
should work in that case, but I'm not sure if there are multiple aria-modal=true
. Should the previous modal get a set back to "false" or be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a test: https://codesandbox.io/s/stacked-modal-qhcp6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lychyi Thanks for taking a look!:)
@NicholasBoll good question! I will ask Peter. I would assume since we have aria-hidden for the first popup aria-modal would be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe that will work as long as we apply aria-hidden
to things. I assume broad support for aria-modal
is a ways off, so we can worry about it then.
Summary
Fixes #587
Checklist
yarn test
passespackage.json
canvas-kit-react
and/orcanvas-kit-css
universal modules, ifapplicable
Additional References