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(storefront): BCTHEME-74 As a shopper I want to have the add to cart modal immediately have keyboard focus #1758

Merged
merged 1 commit into from
Aug 26, 2020

Conversation

yurytut1993
Copy link
Contributor

What?

@BC-tymurbiedukhin @bc-alexsaiannyi

Now when user open a product details modal it has automatically focused on first element (close button). When user tabbing through modal elements focusable will be only modal elements, while user click close button.

Tickets / Documentation

Ticket

Screenshots (if appropriate)

product_details_modal_trap.zip

@bigbot
Copy link

bigbot commented Aug 3, 2020

Autotagging @bigcommerce/storefront-team @davidchin

assets/js/theme/common/product-details.js Outdated Show resolved Hide resolved
assets/js/theme/global/modal.js Outdated Show resolved Hide resolved

const $collection = focusableElements[modalType]();
$collection.get(0).focus();
this.modalSelector = modalSelector;
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for changes, after that we don't need lane 235 as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, working on it right now:)

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.

Good job, one more thing is a squash. Thank you

…o cart modal immediately have keyboard focus
@BC-tymurbiedukhin BC-tymurbiedukhin merged commit 3ac1b2b into bigcommerce:master Aug 26, 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.

4 participants