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
tabbed
determines whether roles should follow the WCAG tabbed carousel requirements.landmark
prop determines whether role should be a region landmark or have role group.carouselId
prop gives the carousel frame an id attribute which can be uniquely targeted by controls.
Changes in functionality
- The
frameAriaLabel
default value has been changed to 'slider' - Default pagination dots have been given the role
tab
and 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 sincetablist
already has list semantics,ul
andli
have been removed. - When the
tabbed
prop istrue
, slides will have the roletabpanel
indicating they are the target of the tab, otherwise they will have the rolegroup
and a description of slide. - When the
tabbed
prop 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-axe
and their corresponding as dev dependencies to ensure Nuka’s test suite verifies accessibility.