Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slider: Temperature Selector Slider Example #1864

Merged
merged 19 commits into from
May 23, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vnurc
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ The “row” role is unnecessary for element “tr”.
Attribute “aria-activedescendant” value should either refer to a descendant element, or should be accompanied by attribute “aria-owns”.
# https://github.com/w3c/aria-practices/issues/1678
Section lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all sections.
# https://github.com/validator/validator/issues/1096
Bad value “none” for attribute “role” on element “svg”.
Bad value “presentation” for attribute “role” on element “svg”.
4 changes: 2 additions & 2 deletions aria-practices.html
Original file line number Diff line number Diff line change
Expand Up @@ -2361,8 +2361,8 @@ <h3>Slider</h3>
<section class="notoc">
<h4>Examples</h4>
<ul>
<li><a href="examples/slider/slider-color-viewer.html">Color Viewer Slider Examples</a>: Demonstrates using three horizontally aligned sliders to make a color viewer.</li>
<li><a href="examples/slider/slider-2.html">Slider Examples with aria-orientation and aria-valuetext</a>: Three thermostat control sliders that demonstrate using aria-orientation and aria-valuetext.</li>
<li><a href="examples/slider/slider-color-viewer.html">Color Viewer Slider Example</a>: Demonstrates using three horizontally aligned sliders to make a color viewer.</li>
<li><a href="examples/slider/slider-temperature.html">Temperature Selector Slider Example</a>: A vertically oriented temperature selector that demonstrates using <code>aria-orientation</code> and <code>aria-valuetext</code>.</li>
</ul>
</section>

Expand Down
16 changes: 9 additions & 7 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ <h2 id="examples_by_role_label">Examples by Role</h2>
<ul>
<li><a href="menu-button/menu-button-links.html">Navigation Menu Button</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="menubar/menubar-navigation.html">Navigation Menubar</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="slider/slider-temperature.html">Vertical Temperature Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="treeview/treeview-navigation.html">Navigation Treeview</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
</ul>
</td>
Expand Down Expand Up @@ -342,8 +343,8 @@ <h2 id="examples_by_role_label">Examples by Role</h2>
<td>
<ul>
<li><a href="slider/multithumb-slider.html">Horizontal Multi-Thumb Slider</a></li>
<li><a href="slider/slider-2.html">Slider with aria-orientation and aria-valuetext</a></li>
<li><a href="slider/slider-color-viewer.html">Color Viewer Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="slider/slider-temperature.html">Vertical Temperature Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
</ul>
</td>
</tr>
Expand Down Expand Up @@ -602,6 +603,7 @@ <h2 id="examples_by_props_label">Examples By Properties and States</h2>
<ul>
<li><a href="button/button_idl.html">Button (IDL Version)</a></li>
<li><a href="slider/slider-color-viewer.html">Color Viewer Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="slider/slider-temperature.html">Vertical Temperature Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="spinbutton/datepicker-spinbuttons.html">Date Picker Spin Button</a></li>
<li><a href="toolbar/toolbar.html">Toolbar</a></li>
</ul>
Expand Down Expand Up @@ -657,8 +659,8 @@ <h2 id="examples_by_props_label">Examples By Properties and States</h2>
<li><a href="meter/meter.html">Meter</a></li>
<li><a href="radio/radio-activedescendant.html">Radio Group Using aria-activedescendant</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="radio/radio.html">Radio Group Using Roving tabindex</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="slider/slider-2.html">Slider with aria-orientation and aria-valuetext</a></li>
<li><a href="slider/slider-color-viewer.html">Color Viewer Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="slider/slider-temperature.html">Vertical Temperature Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="spinbutton/datepicker-spinbuttons.html">Date Picker Spin Button</a></li>
<li><a href="tabs/tabs-1/tabs.html">Tabs with Automatic Activation</a></li>
<li><a href="tabs/tabs-2/tabs.html">Tabs with Manual Activation</a></li>
Expand Down Expand Up @@ -712,7 +714,7 @@ <h2 id="examples_by_props_label">Examples By Properties and States</h2>
</tr>
<tr>
<td><code>aria-orientation</code></td>
<td><a href="slider/slider-2.html">Slider with aria-orientation and aria-valuetext</a></td>
<td><a href="slider/slider-temperature.html">Vertical Temperature Slider</a></td>
</tr>
<tr>
<td><code>aria-owns</code></td>
Expand Down Expand Up @@ -806,8 +808,8 @@ <h2 id="examples_by_props_label">Examples By Properties and States</h2>
<ul>
<li><a href="meter/meter.html">Meter</a></li>
<li><a href="slider/multithumb-slider.html">Horizontal Multi-Thumb Slider</a></li>
<li><a href="slider/slider-2.html">Slider with aria-orientation and aria-valuetext</a></li>
<li><a href="slider/slider-color-viewer.html">Color Viewer Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="slider/slider-temperature.html">Vertical Temperature Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="spinbutton/datepicker-spinbuttons.html">Date Picker Spin Button</a></li>
<li><a href="toolbar/toolbar.html">Toolbar</a></li>
</ul>
Expand All @@ -819,8 +821,8 @@ <h2 id="examples_by_props_label">Examples By Properties and States</h2>
<ul>
<li><a href="meter/meter.html">Meter</a></li>
<li><a href="slider/multithumb-slider.html">Horizontal Multi-Thumb Slider</a></li>
<li><a href="slider/slider-2.html">Slider with aria-orientation and aria-valuetext</a></li>
<li><a href="slider/slider-color-viewer.html">Color Viewer Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="slider/slider-temperature.html">Vertical Temperature Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="spinbutton/datepicker-spinbuttons.html">Date Picker Spin Button</a></li>
<li><a href="toolbar/toolbar.html">Toolbar</a></li>
</ul>
Expand All @@ -832,8 +834,8 @@ <h2 id="examples_by_props_label">Examples By Properties and States</h2>
<ul>
<li><a href="meter/meter.html">Meter</a></li>
<li><a href="slider/multithumb-slider.html">Horizontal Multi-Thumb Slider</a></li>
<li><a href="slider/slider-2.html">Slider with aria-orientation and aria-valuetext</a></li>
<li><a href="slider/slider-color-viewer.html">Color Viewer Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="slider/slider-temperature.html">Vertical Temperature Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="spinbutton/datepicker-spinbuttons.html">Date Picker Spin Button</a></li>
<li><a href="toolbar/toolbar.html">Toolbar</a></li>
</ul>
Expand All @@ -844,7 +846,7 @@ <h2 id="examples_by_props_label">Examples By Properties and States</h2>
<td>
<ul>
<li><a href="slider/multithumb-slider.html">Horizontal Multi-Thumb Slider</a></li>
<li><a href="slider/slider-2.html">Slider with aria-orientation and aria-valuetext</a></li>
<li><a href="slider/slider-temperature.html">Vertical Temperature Slider</a> (<abbr title="High Contrast Support">HC</abbr>)</li>
<li><a href="spinbutton/datepicker-spinbuttons.html">Date Picker Spin Button</a></li>
<li><a href="toolbar/toolbar.html">Toolbar</a></li>
</ul>
Expand Down
107 changes: 107 additions & 0 deletions examples/slider/css/slider-temperature.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/* CSS Document */

.slider-valuetext h3 {
color: black;
font-weight: bold;
font-size: 150%;
}

.slider-temperature .label,
.slider-seek .label {
font-weight: bold;
font-size: 125%;
}

.slider-temperature svg,
.slider-seek svg {
forced-color-adjust: auto;
}

.slider-temperature text,
.slider-seek text {
font-weight: bold;
fill: currentColor;
font-family: sans-serif;
}

.slider-temperature {
width: 12em;
}

.slider-temperature,
.slider-seek {
margin-top: 1em;
padding: 6px;
color: black;
}

.slider-temperature .value,
.slider-slider .value {
position: relative;
top: 20px;
height: 1.5em;
font-size: 80%;
}

.slider-temperature .temp-value,
.slider-seek .temp-value {
padding-left: 24px;
font-size: 200%;
}

.slider-temperature .rail,
.slider-seek .rail {
stroke: currentColor;
stroke-width: 2px;
fill: currentColor;
fill-opacity: 25%;
}

.slider-temperature .thumb,
.slider-seek .thumb {
stroke-width: 0;
fill: currentColor;
}

.slider-temperature .focus-ring,
.slider-seek .focus-ring {
stroke: currentColor;
stroke-opacity: 0;
fill-opacity: 0;
stroke-width: 3px;
display: none;
}

.slider-temperature .slider-group {
touch-action: pan-x;
}

.slider-seek .slider-group {
touch-action: pan-y;
}

.slider-seek .slider-group .value {
display: none;
}

/* Focus and hover styling */

.slider-seek.focus [role="slider"],
.slider-temperature.focus [role="slider"] {
color: #005a9c;
}

.slider-temperature [role="slider"]:focus,
.slider-seek [role="slider"]:focus {
outline: none;
}

.slider-temperature [role="slider"]:focus .focus-ring,
.slider-seek [role="slider"]:focus .focus-ring {
display: block;
stroke-opacity: 1;
}

.slider-seek [role="slider"]:focus .value {
display: block;
}
48 changes: 0 additions & 48 deletions examples/slider/css/text-slider.css

This file was deleted.

51 changes: 0 additions & 51 deletions examples/slider/css/vertical-slider.css

This file was deleted.

Loading