File tree Expand file tree Collapse file tree 5 files changed +10
-3
lines changed
packages/pluggableWidgets/slider-web Expand file tree Collapse file tree 5 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @mendix/slider-web" ,
33 "widgetName" : " Slider" ,
4- "version" : " 2.1.4 " ,
4+ "version" : " 2.1.5 " ,
55 "description" : " Change a number value using a slider" ,
66 "copyright" : " © Mendix Technology BV 2025. All rights reserved." ,
77 "license" : " Apache-2.0" ,
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ function InnerContainer(props: InnerContainerProps): ReactElement {
4242 min : props . min ,
4343 max : props . max
4444 } ) ;
45+ // Label generated by systemProperty has the format: {widgetId}-label
46+ const ariaLabelledByForHandle = `${ props . id } -label` ;
4547
4648 return (
4749 < SliderComponent
@@ -58,6 +60,7 @@ function InnerContainer(props: InnerContainerProps): ReactElement {
5860 step = { props . step }
5961 onChange = { onChange }
6062 marks = { marks }
63+ ariaLabelledByForHandle = { ariaLabelledByForHandle }
6164 handleRender = { handleRender }
6265 ref = { sliderRef }
6366 />
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"
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<package xmlns =" http://www.mendix.com/package/1.0/" >
3- <clientModule name =" Slider" version =" 2.1.4 " xmlns =" http://www.mendix.com/clientModule/1.0/" >
3+ <clientModule name =" Slider" version =" 2.1.5 " xmlns =" http://www.mendix.com/clientModule/1.0/" >
44 <widgetFiles >
55 <widgetFile path =" Slider.xml" />
66 </widgetFiles >
You can’t perform that action at this time.
0 commit comments