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

feature(themes): BCTHEME-71 Add To Cart & Quick View buttons now appear when tabbing on product cards #1738

Merged
merged 4 commits into from Jul 27, 2020

Conversation

yurytut1993
Copy link
Contributor

What?

@BC-tymurbiedukhin @bc-alexsaiannyi

Add To Cart & Quick View buttons now appear when tabbing on product cards. Unfortunately this feature can not be done using only css because we can not affect parent elements. So when we have one button focused we can not remove transparency from class card-figcaption-body to make all buttons visible.

So I created event listener to check if focused element in card and show card-figcaption-body if it it true.

Also I changed tag of quick view button from to , because it is truly button

Tickets / Documentation

Ticket

Screenshots (if appropriate)

card_focus.zip

@bigbot
Copy link

bigbot commented Jul 23, 2020

Autotagging @bigcommerce/storefront-team @davidchin

…ar when tabbing on product cards (remote linter fixes)
Copy link
Contributor

@BC-tymurbiedukhin BC-tymurbiedukhin left a comment

Choose a reason for hiding this comment

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

Generally, I think https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-within would be helpful in this situation (polyfill for IE will be needed)

assets/js/theme/common/product-card.js Outdated Show resolved Hide resolved
assets/js/theme/common/product-card.js Outdated Show resolved Hide resolved
assets/js/theme/common/product-card.js Outdated Show resolved Hide resolved
…ar when tabbing on product cards (with polifill)
…ar when tabbing on product cards (remote linter)
@BC-tymurbiedukhin BC-tymurbiedukhin merged commit e3f9924 into bigcommerce:master Jul 27, 2020
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

3 participants