-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Simplify product-media-gallery
snippet and consumers
#3233
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e3343d7
Simplify featured product to use the same media gallery snippet as ma…
lhoffbeck f421978
Set images with the network response instead of by rendering hidden i…
lhoffbeck ce6ddd7
Removed unnecessary assignment
lhoffbeck ce60a3d
Update media refresh handling to minimize rerenders
lhoffbeck 06b57af
Tweaks to fix JS error and modal content not updating when switching …
lhoffbeck 300b6fb
Removed dead code
lhoffbeck 5abaa7e
Update fallback selector
lhoffbeck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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 reason we originally had two was because of tab order. In our accessibility review, we came to the conclusion that using CSS order could result in a misleading tab order considering there are multiple elements in the Product Media column.
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.
Yes! Accessibility wise we wouldn't want to do that 👍
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.
Ahh great callout, I'll dig into this a bit more.
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.
Okay! I caught up with @svinkle (our internal a11y legend) about this. He called out that while it definitely would be preferable to have the visual order match the tab order, this likely wouldn't be a high-SEV issue and that the perf benefit may be a worthwhile tradeoff. We narrowed down on two approaches for when the image gallery is positioned on the right:
order
to position and add a product info skiplink to the image gallery. Buyers landing on the page on desktop would tab first to the image gallery skiplink and (optionally) then to the product info, on mobile the behavior is unchanged from how it works today. DemoI put together a test store for each approach and Scott floated them past the Head of Accessibility Innovation at Fable: