influxdata / clockface

UI Kit for building Chronograf
https://influxdata.github.io/clockface
MIT License
43 stars 18 forks source link

Multi Range Slider + Single Slider Accessibility Improvements (Branden Interview) #725

Closed brandenTenbrink closed 1 year ago

brandenTenbrink commented 2 years ago

Closes #

Changes

  1. Had to force the Typescript package to 4.2.2 to allow the package to compile on local

  2. Changed the Single Range Input Max value into an Input [type=Number]. This allows a user to be able to input a value vs. having to use the slider. This change is meant to address screen reader users + those with finite motor controls in their hands.

  3. Created a Multi Range Slider type, in addition to the existing single. This allows for 2 input selectors, with Input [type=Number[] for both the lower and upper values.

  4. Supporting tweaks to the RangeSlider and Input tsx files to support the Multi Range Slider

Known Issues/Discussions: These are areas that are not up to par. Would need more time + discussion to better understand the product and users.

  1. Accessibility surrounding Number Input and min + max values. Currently uses as aria-label to provide the min and max value for each input as a stop gap solution.

  2. Vertical is Broken for both Single and Multi Sliders. The change to using a Number Input does not play not with the width of a vertical slider (for single) and the use of two inputs do not play well with the verticality.

  3. Utilize the "style" field to determine the sizing of the multi range slider track

  4. Are there ways to improve the # of code lines surrounding the Multi Range Slider + its supporting css.

  5. Need tests around the new Multi Slider + update old tests for the Range Slider

Screenshots

Screen Shot 2022-02-08 at 10 59 57 AM Screen Shot 2022-02-08 at 10 59 52 AM Screen Shot 2022-02-08 at 11 02 37 AM

153026280-35da76ba-ce9d-4732-8a83-979edfc9cf5a.png">

Screen Shot 2022-02-08 at 11 02 30 AM

Checklist

Check all that apply