Skip to content
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(storefront:)STRF-8521 add correct alt text on image change in product view #1747

Merged
merged 1 commit into from Jul 28, 2020

Conversation

bc-alexsaiannyi
Copy link
Contributor

What?

@BC-tymurbiedukhin @yurytut1993

This PR fixes issue with viewing a product with multiple images. When User clicks on other available images the alt text doesn't change and continues to display a text for the default image.

Tickets / Documentation

Screenshots (if appropriate)

Alt Text Images Fixed

@bigbot
Copy link

bigbot commented Jul 28, 2020

Autotagging @bigcommerce/storefront-team @davidchin

Comment on lines 45 to 52
const first = 0;
const $target = $(e.currentTarget);
const imgObj = {
mainImageUrl: $target.attr('data-image-gallery-new-image-url'),
zoomImageUrl: $target.attr('data-image-gallery-zoom-image-url'),
mainImageSrcset: $target.attr('data-image-gallery-new-image-srcset'),
$selectedThumb: $target,
mainImageAlt: $target[first].children[first].alt,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose that variable on line 45 is unnecessary here, because it has no calculation and no specific usage

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants