-
Notifications
You must be signed in to change notification settings - Fork 54
feat(carousel): adding actionable items into carousel #2271
Conversation
root: {}, | ||
}, | ||
root: { | ||
stopPropagation: { |
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.
This looks like a strange name for keyAction. Can we use something related to the fact that navigation happend?
Perf comparison
Generated by 🚫 dangerJS |
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.
Done :)
@@ -16,7 +17,11 @@ const carouselItemBehavior: Accessibility<CarouselItemProps> = props => ({ | |||
}, | |||
|
|||
keyActions: { | |||
root: {}, | |||
root: { | |||
arrowKeysNavigationStopPropagation: { |
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.
Let's add a unit test for this.
It should check that left/right arrows sent to a child of the container (the visible item for instance, or a child of that visible item) should not move the slides.
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.
thanks :) for this catch. Tests added, as well a specification line in the top of file.
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.
address the last comment. otherwise lgtm!
…com/microsoft/fluent-ui-react into mituron/carousel-focusable-elements
Adding actionable items into the carousel.
Trying to add button, buttons and toolbar to carousel slide.
If user is inside the carousel item and press right/left arrow key, then rotation of carousel was still working. This is fix with stopPropagation.
BE CAREFUL carousel is not fully accessible, related bugs reported in the ticket:
#2272