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.
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: Reimplement lightbox trigger as a minimal button in corner of image #55212
Image: Reimplement lightbox trigger as a minimal button in corner of image #55212
Changes from 10 commits
2956be6
5a084d4
c264096
6302aea
de70bcb
25a91bc
994e04c
0e86105
d9357e5
cea71f1
e3c0d00
6bae728
c7bfa37
bd9d8b8
cd54522
09b2f7b
94d8c3a
dce84bc
c1e79f9
ef8f9e2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Unsure about conventions, but should this be
left
forrtl
languages?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 sounds like a good candidate for a follow up PR. I've added this point to the next version in the lightbox tracking issue.
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.
Same as with the close button: if we navigate to a lightbox with the keyboard, but I close it using a click, I lose the focus, which I assume is not correct, right?
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.
Why don't we want to focus the close button when opening the button by clicking the image? Right now, it keeps the active element outside of the modal, which I believe is not correct, right?
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.
That was a point brought up some folks from design a while back — they did not want a close button at all because they felt it would distract and be unnecessary.
I figured adding this so the focus ring doesn't become visible and draw attention to the close button would be a good move. Personally I would prefer to not have my attention immediately drawn to a close button when trying to get a better view of an image.
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.
There are potential accessibility issues here, though. The context would indeed be incorrect for folks who activate the lightbox using a mouse while also using a screen reader.
Is this a use case we should handle? I'm currently searching Google for guidance around this, and will also ping @afercia @joedolson @alexstine for feedback.
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.
The problem is that with that approach we are losing the focus and it is causing some issues. When opening an image by clicking on it: