-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Modal issues with bx--visually-hidden #5545
Comments
Historically a couple different things I've done to address very similar problems:
WH also uses the |
possibly related #2740 |
I believe the fix here is removing the text inside the nodes, correct? Over in: https://github.com/carbon-design-system/carbon/pull/5260/files#diff-2c7f897c16aa710c426b6fd9c3ad155fR241 cc @asudoh |
@joshblack Removing the focus sentinel text fixes the example on the URL, but this was brought to my attention by someone using |
@tombrunet ah got it, sorry I misread this line:
Definitely understand now 👍 |
I'm not sure there is a proper way for something to receive focus, but then not be read by a screen reader...Focus sentinel was added (I believe) to fix keyboard focus getting lost when the modal was opened.
We definitely should be toggling Were the users just looking for a helper to hide something in the modal completely? |
This change addresses a common known problem of `visibility:visible` style; If an element with `visibility:hidden` has a child element with `visibility:visible`, the child element will be visible even though in most cases it's expected that the entire content (including the child element) is hidden. Refs carbon-design-system#5545.
Made a quick fix to Wrt focus sentinel; It's for focus-wrap behavior that ensures viewport won't lose the focus before we can bring the focus back in modal. More details can be found at: https://developers.google.com/web/fundamentals/accessibility/focus/using-tabindex The "Focus sentinel" content is a pseudo content, given DAP won't allow empty content there. Let us know if there are any suggestions for better content. |
This change addresses a common known problem of `visibility:visible` style; If an element with `visibility:hidden` has a child element with `visibility:visible`, the child element will be visible even though in most cases it's expected that the entire content (including the child element) is hidden. Refs #5545.
This change addresses a common known problem of `visibility:visible` style; If an element with `visibility:hidden` has a child element with `visibility:visible`, the child element will be visible even though in most cases it's expected that the entire content (including the child element) is hidden. Refs #5545.
I think this issue has been solved, but @tombrunet please let us know if you think otherwise. Thanks! |
@asudoh It looks like this hasn't been released yet and https://vanilla.carbondesignsystem.com/ returns a 403 message. Is there an environment where I can test this without having to run it locally? |
Uh Netlify for vanilla has been killed... I got https://vanilla.carbondesignsystem.com/ back up and running with latest |
Thanks @asudoh. This looks to be resolved @tombrunet. I copied WH's HTML in to the Netlify demo and ran DAP without any color contrast violations. |
Environment
Browser: Chrome (probably any)
Automated testing tool and ruleset: N/A, but IBM DAP surfaces the issue through color contrast rules
Assistive technology used to verify: None & JAWS
Detailed description
What version of the Carbon Design System are you using?
See https://react.carbondesignsystem.com/iframe.html?id=modal--default
What's the issue?
Content within the modal marked as bx--visually-hidden is visible to ATs and copyable text, whether the modal is hidden or not.
Steps to reproduce the issue
Note: JAWS sees the same thing, whereas VoiceOver does not handle visibility correctly, so it doesn't announce it.
Result is:
The example doesn't give you a way to hide the modal, but if you do hide the modal, and repeat the steps above, you see:
Note: The focus sentinel doesn't make a lot of sense to me either, but simply highlights the issue of any content marked with bx--visually-hidden
Additional information
There are somewhat two issues here:
visibility: hidden
and the bx--visually-hidden usesvisibility: visible
. For CSS visibility, a visible element within a hidden element is visible. (see https://jakearchibald.com/2014/visible-undoes-hidden/ for an example).display:none
is better at hiding all children, but that might affect your animation? It's the safest bet. However, even if you don't go that route, for this particular situation you could do something to override thevisibility: visible
within a modal, like.modal-hidden .bx--visually-hidden { visibility: hidden }
(you don't currently have a.modal-hidden
class as far as I can tell though.The text was updated successfully, but these errors were encountered: