-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Image: Close button in the lightbox hard to see with dark images #51126
Comments
@jasmussen @SaxonF @jameskoster How should we handle this? I'd like to resolve this using just CSS if possible. Should we just add a white border around the close button? |
I appreciate the iteration and care with which this is being considered. I know a lot of effort went into this, so please forgive me if I'm re-treading older conversations. The main thing is, it still isn't entirely clear to me why we need an explicit close button always visible, as there is a clear zoom-out cursor for sighted users, and Esc takes you out of it as well. Could a focus-visible approach be taken, in that if you use keyboard navigation to focus the image, press Enter to zoom in, then the close button is visible and focused? If we can do that, we can simply add a circular black semi-transparent (say 60%) background beneath a white X. The bordered X as shown above isn't working so well. |
@jasmussen Thank you for the ideas, and no worries, I think it can be good to have a more focused conversation around the close button now that many other parts of the lightbox have been implemented. I believe the close button should always be visible because otherwise, the interface is unclear for folks who navigate using voice input. I'll ping in @andrewhayward, @alexstine, and @joedolson for additional insight and see if the focus-visible approach or some variation could be appropriate. |
Back when I was visually impaired and not totally blind, I always used close buttons on popups. That was before I had to learn every keyboard shortcut under the sun and clicking outside was always tricky due to magnification programs I used such as ZoomText. There is no reason to not have a visible close button. Why design in this project is so against it is totally beyond me but sometimes there is a reason the basics are the basics. |
I'm trying to understand this a bit better. @alexstine, per your comment, it seems to me that the problem you describe happens when the popup doesn't have a close button and needs to be closed by clicking outside of the popup.
|
@luisherranz Yes and yes. A close button definitively tells a user what is going to happen when they click it and it is generally in view. A click inside would be really disruptive if someone missed a click target. Not a pattern we should adopt for the project. ZoomText is a very expensive program, I wish I knew of something that could replicate the experience so you can understand how a zoomed in view could make it very hard for visually impaired users to click on space outside of a pop-up. |
That's easy to understand, don't worry 🙂
May I ask what do you mean by "missing a click target"? Thanks, Alex! 🙏 |
One of the goals in accessibility is to support the multi-modal nature of user experience. Users should be able to accomplish their tasks using any of the standard mechanisms they're like to know and understand. Not all users are able or willing to experiment to try and find how they do something; and many users will become easily frustrated if they are forced to do this. It's also important to remember that it will be very easy for a user to activate these lightboxes by accident; they're a large clickable area (the image) with no visually obvious activation control. So there could be frustration present even before the user searches for the close mechanism. So being able to close the lightbox either by clicking on a close button with an expected look and location, clicking outside the image, or pressing |
Just to understand and confirm, and apologies for being insistent. So, even if we do all this:
Is there still a need for a close button on click? If so:
|
If mobile apps do not have close, cancel, or back buttons, this is an accessibility failure completely as there is no escape or click outside for assistive tech users. If anything, it is essential for mobile and high priority for desktop. I do not envision a situation where a pop up or modal should never have a close button. Thanks. |
As Alex mentions, "click outside" may not exist for mobile or low vision visitors. A screen reader in reading mode may not scroll using arrow keys when focus is trapped; visitors with cognitive impairments or low technical comprehension may only search for a control to use and not take any other actions, or just be confused when they don't know how they closed the modal. The presence of a close button increases user confidence that the action they are taking will do what they expect. Yes, there should be a close button. You are correct that in the majority of scenarios it is not needed, and many users will not need it or use it. However, we are trying to cover the needs of all users, not just most users. |
@luisherranz @alexstine @joedolson Hey all, thanks so much for the additional clarification and discussion! We'll move forward with the visible close button as recommended 👍 |
Description
When using the lightbox behavior for the Image block that contains a dark image, it displays the
Close
button in a way that is hard to see it.Step-by-step reproduction instructions
Resolution
toFull Size
. Alternatively, it might work with different settings depending on the screen-size used.Close
button is correctly displayed.Screenshots, screen recording, code snippet
Editor view:
Frontend view:
Lightbox view:
Environment info
trunk
)Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: