From 937cfab628be70371ceff85f2c4002710e377059 Mon Sep 17 00:00:00 2001 From: Jon Gunderson Date: Tue, 24 Aug 2021 09:16:10 -0500 Subject: [PATCH] Add Example: Media Seek Slider (pull #1863) Adds a horizontal slider that illustrates: * Appending max value to aria-valuetext on focus, but not on change in value. * Using SVG graphics elements * Increased size of clickable area on rail to change value with pointing device * High contrast support * Latest APG coding practices, including: * Use of event.key. * Use of pointer events. * CSS property forced-color-adjust to auto on the SVG elements. * Using stroke-opacity and fill-opacity instead of transparent values for setting stroke and fill colors for SVG rect to support focus ring visibility in high contrast modes. Co-authored-by: Matt King --- aria-practices.html | 3 +- examples/index.html | 8 + examples/slider/css/slider-seek.css | 81 ++++ examples/slider/js/slider-seek.js | 360 +++++++++++++++++ examples/slider/slider-color-viewer.html | 3 +- examples/slider/slider-rating.html | 3 +- examples/slider/slider-seek.html | 335 ++++++++++++++++ examples/slider/slider-temperature.html | 1 + test/tests/slider_slider-seek.js | 476 +++++++++++++++++++++++ 9 files changed, 1267 insertions(+), 3 deletions(-) create mode 100644 examples/slider/css/slider-seek.css create mode 100644 examples/slider/js/slider-seek.js create mode 100644 examples/slider/slider-seek.html create mode 100644 test/tests/slider_slider-seek.js diff --git a/aria-practices.html b/aria-practices.html index 6d9d8eeede..10a16ba1f6 100644 --- a/aria-practices.html +++ b/aria-practices.html @@ -2363,8 +2363,9 @@

Slider

Examples

diff --git a/examples/index.html b/examples/index.html index 0f478b3984..25b17c118c 100644 --- a/examples/index.html +++ b/examples/index.html @@ -262,6 +262,7 @@

Examples by Role

@@ -345,6 +346,7 @@

Examples by Role

  • Horizontal Multi-Thumb Slider
  • Color Viewer Slider (HC)
  • Rating Slider (HC)
  • +
  • Media Seek Slider (HC)
  • Vertical Temperature Slider (HC)
  • @@ -605,6 +607,7 @@

    Examples By Properties and States

  • Button (IDL Version)
  • Color Viewer Slider (HC)
  • Rating Slider (HC)
  • +
  • Media Seek Slider (HC)
  • Vertical Temperature Slider (HC)
  • Date Picker Spin Button
  • Toolbar
  • @@ -663,6 +666,7 @@

    Examples By Properties and States

  • Radio Group Using Roving tabindex (HC)
  • Color Viewer Slider (HC)
  • Rating Slider (HC)
  • +
  • Media Seek Slider (HC)
  • Vertical Temperature Slider (HC)
  • Date Picker Spin Button
  • Tabs with Automatic Activation
  • @@ -813,6 +817,7 @@

    Examples By Properties and States

  • Horizontal Multi-Thumb Slider
  • Color Viewer Slider (HC)
  • Rating Slider (HC)
  • +
  • Media Seek Slider (HC)
  • Vertical Temperature Slider (HC)
  • Date Picker Spin Button
  • Toolbar
  • @@ -827,6 +832,7 @@

    Examples By Properties and States

  • Horizontal Multi-Thumb Slider
  • Color Viewer Slider (HC)
  • Rating Slider (HC)
  • +
  • Media Seek Slider (HC)
  • Vertical Temperature Slider (HC)
  • Date Picker Spin Button
  • Toolbar
  • @@ -841,6 +847,7 @@

    Examples By Properties and States

  • Horizontal Multi-Thumb Slider
  • Color Viewer Slider (HC)
  • Rating Slider (HC)
  • +
  • Media Seek Slider (HC)
  • Vertical Temperature Slider (HC)
  • Date Picker Spin Button
  • Toolbar
  • @@ -853,6 +860,7 @@

    Examples By Properties and States