igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

Slider accessibility issues

Open valadzhov opened this issue 1 year ago • 4 comments

Description

The following accessibility issues are present in the component at the moment:

  • it's missing ariavalue-now
  • tab-index is 1 (it should be 0)
  • missing accessible name (it needs to be implemented by aria-labelledby
  • all of the ARIA attributes are not on the focusable element (the thumb)

valadzhov avatar May 23 '24 15:05 valadzhov

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jul 28 '24 00:07 github-actions[bot]

@valadzhov , @georgianastasov , why should the tabindex be 1?

ChronosSF avatar Sep 19 '24 09:09 ChronosSF

@valadzhov , @georgianastasov , why should the tabindex be 1?

Yep, good question. I've missed to look at this initially. It does not make sense to make the value 1. Actually, it is not recommended to set any positive integer value (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)

hanastasov avatar Sep 19 '24 13:09 hanastasov

Apologies for the delayed reply, Outlook placed the email in the wrong folder.

@valadzhov , @georgianastasov , why should the tabindex be 1?

Yep, good question. I've missed to look at this initially. It does not make sense to make the value 1. Actually, it is not recommended to set any positive integer value (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)

Corrected, should be 0

For the existing igx-thumb-label - that one is equivalent to the aria-valuenow and not needed to be added again as label. In the cases where the labels are overridden (weekdays sample) it's equivalent to the aria-valuetext attribute, so that's not directly usable as a label for the entire slider. That needs to come from elsewhere.

Also see https://www.w3.org/WAI/ARIA/apg/patterns/slider/ The WebComponents' Slider already implements all of these https://github.com/IgniteUI/igniteui-webcomponents/wiki/Slider-Specification#accessibility And implementation: https://igniteui.github.io/igniteui-webcomponents/?path=/story/slider--default

valadzhov avatar Sep 27 '24 11:09 valadzhov