Aria describedby Tags - Hide if dots are disabled, evenly distribute when more slides than dots #2346
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I have identified 2 scenarios in which I believe there are issues in the way "aria-describedby" tags are generated and applied to slides.
Issue: #2020
Resolution
To resolve these issues, I've applied the following changes:
Fiddle: https://jsfiddle.net/ibarsi/4khqcw9t/5/
NOTE
I just wanted to mention that we may want to consider removing the generation of "aria-describedby" tags entirely... After these changes, accessibility checkers won't give the DOM generated by slick a failing grade, however I don't believe the dots provide a useful description of their referenced slides. Elements referenced as describers should really contain some sort of text that provides screen readers additional details that may not be apparent. This should probably be something that users of slick tag and create themselves, if they choose to.
Spec Reference: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute