File tree Expand file tree Collapse file tree
packages/pluggableWidgets/slider-web/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ function InnerContainer(props: InnerContainerProps): ReactElement {
4343 min : props . min ,
4444 max : props . max
4545 } ) ;
46+ // Label generated by systemProperty has the format: {widgetId}-label
47+ const ariaLabelledByForHandle = `${ props . id } -label` ;
4648
4749 return (
4850 < SliderComponent
@@ -59,6 +61,7 @@ function InnerContainer(props: InnerContainerProps): ReactElement {
5961 step = { props . step }
6062 onChange = { onChange }
6163 marks = { marks }
64+ ariaLabelledByForHandle = { ariaLabelledByForHandle }
6265 handleRender = { handleRender }
6366 ref = { sliderRef }
6467 />
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ describe("Slider", () => {
88 const defaultSliderProps : SliderProps = {
99 min : - 100 ,
1010 max : 100 ,
11- step : 10
11+ step : 10 ,
12+ ariaLabelledByForHandle : "test-slider"
1213 } ;
1314
1415 function renderSlider ( props ?: Partial < SliderProps > ) : ReturnType < typeof render > {
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ exports[`Slider renders horizontal Slider correctly 1`] = `
2020 />
2121 <div
2222 aria-disabled = " false"
23+ aria-labelledby = " test-slider"
2324 aria-orientation = " horizontal"
2425 aria-valuemax = " 100"
2526 aria-valuemin = " -100"
@@ -75,6 +76,7 @@ exports[`Slider renders markers correctly 1`] = `
7576 </div >
7677 <div
7778 aria-disabled = " false"
79+ aria-labelledby = " test-slider"
7880 aria-orientation = " horizontal"
7981 aria-valuemax = " 100"
8082 aria-valuemin = " -100"
@@ -143,6 +145,7 @@ exports[`Slider renders vertical Slider correctly 1`] = `
143145 />
144146 <div
145147 aria-disabled = " false"
148+ aria-labelledby = " test-slider"
146149 aria-orientation = " vertical"
147150 aria-valuemax = " 100"
148151 aria-valuemin = " -100"
You can’t perform that action at this time.
0 commit comments