airbnb / rheostat

Rheostat is a www, mobile, and accessible slider component built with React
MIT License
1.69k stars 188 forks source link

Aria-labels can't be added to slider buttons #273

Open ccveer opened 4 years ago

ccveer commented 4 years ago

For compliance, I need to add aria-labels to the slider buttons in an implementation like this one: http://localhost:9001/?path=/story/slider--rtl-multiple-handle. There doesn't seem to be a way to do this currently.

rfx91 commented 3 years ago

Running into the same issue.

orlando commented 3 years ago

A workaround for this is to modify the defaultProps.aria-label on the DefaultHandle component like this.

// Workaround to add aria-label to Rheostat DefaultHandle
Rheostat.defaultProps.handle.defaultProps['aria-label'] = 'Slider handle';
rastersysteme commented 2 years ago

+1 I would love to see this fix as well!