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

Updated slider examples using aria-valuetext based on 6 April 2021 meeting #1857

Closed
wants to merge 3 commits into from

Conversation

jongund
Copy link
Contributor

@jongund jongund commented Apr 13, 2021

I have created a new example based on the discussion at the 6 April 2021 meeting to include the temperature slider, remove fan speed slider and a new media seek slider to illustrate the use of aria-valuetext.

Features.Changes:

  • Example uses SVG graphics elements
  • Increased size of clickable area on rail to change value with pointing device
  • Has high contrast support
  • Code to use APG coding practices
  • Uses event.keyCode
  • Uses pointer events
  • Uses the presentation role on SVG element
  • Sets the 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 the SVG rect used for focus ring for high contrast mode.

Preview media seek slider example

Review checklist


Preview | Diff

@jongund jongund changed the title Update sliders for aria-valuetext examples Updated slider examples using aria-valuetext base on 6 April 2021 meeting Apr 13, 2021
@jongund jongund requested review from spectranaut, carmacleod, smhigley, mcking65, a11ydoer and charmarkk and removed request for spectranaut April 13, 2021 22:09
@jongund jongund changed the title Updated slider examples using aria-valuetext base on 6 April 2021 meeting Updated slider examples using aria-valuetext based on 6 April 2021 meeting Apr 14, 2021
@jscholes
Copy link
Contributor

@jongund Thanks for your work on this! Some initial thoughts:

  1. I think there are some outstanding decisions from Addressing Slider Update Concerns #1847 that will have an impact on this example. E.g. it was my understanding that the different values for aria-orientation could be demonstrated by having seek (horizontal) and volume (vertical) sliders on the same page, making a thematically consistent example rather than the seek bar and temperature sliders being together.
  2. Having both on one page would also allow for shorter labels ("Seek" and "Volume" rather than "Media Seek").
  3. Do we want the seek bar to indicate the maximum value (i.e. the total duration) in its value text? For example, "1 minute 30 seconds of 5 minutes".
  4. In aria-valuetext, the number of seconds is zero-padded so you get announcements like, "1 minute 0 0 seconds" and "2 minutes 0 5 seconds".
  5. When the number of minutes is less than 1, should only the seconds be included in aria-valuetext (rather than "0 minutes N seconds")?

@jongund
Copy link
Contributor Author

jongund commented Apr 16, 2021

@jscholes
Thank you for the feedback on aria-valuetext, I updated the calculation, let me know what you think.
Separating the two slides we can discuss on Tuesday, unless Matt King responds with a definitive direction.

Copy link
Contributor

@smhigley smhigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visuals & approach look good to me!

* Desc: Slider widget that implements ARIA Authoring Practices
*/

class SliderSeek {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest splitting each class to its own JS file, just to make them easier to find and read, but since it's already been suggested that we only have one example per page, that's probably happening anyway.

@jongund jongund mentioned this pull request Apr 21, 2021
9 tasks
@jongund
Copy link
Contributor Author

jongund commented Apr 21, 2021

This pull request is no longer needed sine the two example were split to create pull #1863 and pull #1864.

@jongund jongund closed this Apr 21, 2021
@a11ydoer
Copy link
Contributor

Thanks, @jongund !

@zcorpan zcorpan deleted the slider-valuetext branch May 31, 2021 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants