Open recrit opened 1 year ago
The opened PR #88 makes the following changes: List / Slider:
aria-label
or aria-labelledby
then the aria-label
is not set with the hard coded "carousel" or the options.regionLabel
.Item / Slide:
options.customItemLabel
function similar to options.customPaging
that is passed the slider and the slide index. This allows the caller to pass in a custom label function or use the default that would return "slide [number of slide]".aria-labelledby
then the aria-label
is not set with the options.customItemLabel
.@recrit : when will it be released to fix the problem
@achemkhi The PR #88 is opened for the accessible-slick maintainers to review, so it is up to them when it is released.
The following represents the aria-labels used as of master 61b5322:
aria-label
can be customized with the optionregionLabel
; however, if you do not set aregionLabel
then a hard coded "carousel" is used.aria-label
cannot customized. Thearia-label
is always set to "slide [number of slide]", example "slide 2".Issues
aria-label
oraria-labelledby
that provides more details or is translated by a backend CMS (example Drupal).Item / Slide: The hard coded value is not translatable and cannot be customized to provide a more specific label (example: "Image 1 of 5").
Desired Changes to support customizing the aria-labels
aria-label
oraria-labelledby
then the slick library should not override it with the hard coded "carousel" or theoptions.regionLabel
.options.customItemLabel
function similar tooptions.customPaging
that is passed theslider
and the slide index. This would allow the caller to pass in a custom label function or use the default that would return "slide [number of slide]".aria-label
oraria-labelledby
then the slick library should not override it with theoptions.customItemLabel
.Generic Example:
Example with Drupal: