v7 Upgrade Guide
Nuka Carousel 7 is a major release that introduces changes to make the carousel better align with the WCAG Aria Authoring Practices Guide. This guide will help you upgrade from v6 to v7.
New props
tabbeddetermines whether roles should follow the WCAG tabbed carousel requirements.landmarkprop determines whether role should be a region landmark or have role group.carouselIdprop gives the carousel frame an id attribute which can be uniquely targeted by controls.
Changes in functionality
- The
frameAriaLabeldefault value has been changed to 'slider' - Default pagination dots have been given the role
taband aria-controls will target their slide. - Pagination dots parent has been given the role
tablist. As tabs need to be the immediate child oftablist, and sincetablistalready has list semantics,ulandlihave been removed. - When the
tabbedprop istrue, slides will have the roletabpanelindicating they are the target of the tab, otherwise they will have the rolegroupand a description of slide. - When the
tabbedprop isfalse, default pagination dots will not be rendered. - Default next and previous buttons now target the slider frame with aria-controls.
Changes in dev tooling
- This release adds
jest-axeand their corresponding as dev dependencies to ensure Nuka’s test suite verifies accessibility.