Skip to content

Commit 6a933a9

Browse files
authored
Vertical Temperature Slider Example: Eliminate redundant AX tree rendering of value (pull #3258)
Fix issue #3257 Eliminate redundant announcement of the slider value by screen readers. This commit moves the text node that visually displays the value above the slider. It was previously outside the element with role slider. It is now a child of the slider, making the text presentational.
1 parent f163e7a commit 6a933a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/patterns/slider/examples/slider-temperature.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ <h2 id="ex_label">Example</h2>
6262
<div id="id-temp-label" class="label">Temperature</div>
6363

6464
<svg role="none" class="slider-group" width="145" height="360">
65-
<text class="temp-value" x="28" y="35">25°C</text>
66-
<rect class="rail" x="60" y="47" width="8" height="300" rx="5" aria-hidden="true" />
6765
<g role="slider" id="id-temp-slider" aria-orientation="vertical" tabindex="0" aria-valuemin="10.0" aria-valuenow="25.0" aria-valuetext="25.0 degrees Celsius" aria-valuemax="38.0" aria-labelledby="id-temp-label">
66+
<text class="temp-value" x="28" y="35">25°C</text>
67+
<rect class="rail" x="60" y="47" width="8" height="300" rx="5" aria-hidden="true" />
6868
<text class="value" x="94" y="150">25°C</text>
6969
<rect class="focus-ring" x="35" y="170" width="105" height="24" rx="12" />
7070
<rect class="thumb" x="35" y="145" width="48" height="14" rx="5" />

0 commit comments

Comments
 (0)