-
Notifications
You must be signed in to change notification settings - Fork 615
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-68 Add tooltips for carousel "Previous" and "Next" buttons #1749
Conversation
Autotagging @bigcommerce/storefront-team @davidchin |
if (lastSlide < 2) return; | ||
if ($arrowLeft.length === 0 || $arrowRight.length === 0) return; |
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.
Can we concatenate conditions?
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, but in this case I would like to have different conditions, because it is more obvious what cases are unsuitable for continuing function
What?
@BC-tymurbiedukhin @bc-alexsaiannyi
Carousel now has arrows with dynamic aria-labels. It tells the user on what exactly slide he will go when click on arrow, and how many slides in carousel. Also refactored code
Tickets / Documentation
Ticket
Screenshots (if appropriate)
left arrow init
right arrow init
left arrow after slide forward
right arrow after slide forward
Also I changed behaviour of products carousel a little bit (at the bottom of the homepage). Now click on arrow triggers moving slides by one. And carousel in a loop now. This is necessary for correct aria-labels of arrows. Or maybe we can use
"Previous" and "Next" for aria-labels in this carousel
product carousel now
product carousel before