-
Notifications
You must be signed in to change notification settings - Fork 350
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: Updated multithumb slider based on slider focus group meeting #1758
Conversation
@patrickhlauke |
Functional review for Windows Chrome/Edge/FF, Mac Safari/Chrome/FF: all work well with mouse and keyboard. Functional review for iOS and iPadOS Safari/Chrome: works pretty well in Safari - it can take a few tries to start the drag unless I zoom in, but then it's ok. Chrome iOS/iPadOS seems to have the same erratic zoom problems as I saw in the temperature slider in #1755 (comment). Interestingly, if I click on the "Open in CodePen" button in iOS Safari, I see the same erratic drag behavior in Safari CodePen as I saw for zoomed-in Chrome. I wonder if that's a clue, somehow. Hmmm, one more clue. I think maybe Chrome is being unforgiving. If you drag even a fraction of a pixel in the up/down direction when dragging a thumb left or right, it cancels the drag. So I still think this is a Chrome iOS/iPadOS problem, but I'm not 100% sure. If it is, I don't know if we can work around it. One little visual nit: The first time after page reload that I tab to the max thumb, the visible text isn't centered in the focus outline. After typing arrow keys, or dragging with the mouse, it fixes itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an approving Functional review!
Nice work, @jongund !
I think the erratic drag when zoomed problem is an iOS Chrome bug, and we can open an issue for them after this is merged.
Note that there are still other pending reviews remaining: Accessibility, Visual Design, Editorial, Code and Test.
General comment: I'd love to see these examples use
(though that will then also require some tweaking of the table styles to avoid them pushing out the content/leading to horizontal scrolling of the whole page) to make the experience a bit more mobile/small-screen friendly. This example works very well on a Surface touchscreen, on iPhone/Safari, reasonably in iPhone/Chrome (seems the webview used for Chrome gets a bit flakey with respecting the Android/Chrome/TalkBack announces percentage only when focusing a thumb. Users can change value by double-tap-and-hold-ing the thumb, then moving their finger. Changing percentage value is announced when moving. Overall, combined with the notice/warning that support may not be complete, this is all very cool and, I'd say, good to release. |
if we're ok with the new rewording from #1746 (comment) suggest adding it here as well |
That's the plan. @mcking65 changed the words a bit, but definitely incorporated your feedback. Thank-you! |
<main> | ||
<h1>Horizontal Multi-Thumb Slider Example</h1> | ||
<div class="advisement"> | ||
<p> <p><strong>WARNING!</strong> Some users of touch-based assistive technologies may experience difficulty utilizing widgets that implement this slider pattern because the gestures their assistive technology provides for operating sliders may not yet generate the necessary output. To change the slider value, touch-based assistive technologies need to respond to user gestures for incrementing and decrementing the value by synthesizing key events. This is a new convention that may not be fully implemented by some assistive technologies. Authors should fully test slider widgets using assistive technologies on devices where touch is a primary input mechanism before considering incorporation into production systems.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p> <p><strong>WARNING!</strong> Some users of touch-based assistive technologies may experience difficulty utilizing widgets that implement this slider pattern because the gestures their assistive technology provides for operating sliders may not yet generate the necessary output. To change the slider value, touch-based assistive technologies need to respond to user gestures for incrementing and decrementing the value by synthesizing key events. This is a new convention that may not be fully implemented by some assistive technologies. Authors should fully test slider widgets using assistive technologies on devices where touch is a primary input mechanism before considering incorporation into production systems.</p> | |
<p><strong>WARNING!</strong> Some users of touch-based assistive technologies may experience difficulty utilizing widgets that implement this slider pattern because the gestures their assistive technology provides for operating sliders may not yet generate the necessary output. To change the slider value, touch-based assistive technologies need to respond to user gestures for incrementing and decrementing the value by synthesizing key events. This is a new convention that may not be fully implemented by some assistive technologies. Authors should fully test slider widgets using assistive technologies on devices where touch is a primary input mechanism before considering incorporation into production systems.</p> |
…t wording from other examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editorial revision complete; this is an approving editorial review.
However, since we'll merge the seek slider before this one, there will be one more update to the list of similar example links.
There are some CSS lint failures. |
@mcking65 |
@shirsha |
Thanks @jongund
For eg:
For right thumb ( Maxmium price range), the aria-valuemin is 110 (current min value selected by the user). should the min value be zero?
JAWS.narration.for.min.and.max.mp4 |
The question is whether aria-valuemin/max should indicate the theoretically possible number or the currently possible one. In this example it is the currently possible one (which is the better solution in my opinion). The question is not answered by the ARIA specification and HTML can't be used as a reference, because there are no multi-thumb sliders. |
@shirsha wrote:
Thank you Siri.
That is a Narrator issue, thus the warning at the top of the page.
This is by design. The thumbs are not allowed to cross, and this is communicated to users via min and max.
I think this is a JAWS bug because if you press insert+escape, the correct value is read. @shirsha, based on this information, do you approve merging? If yes, could you please go to the files tab and submit an approving review that lists the types of tests you completed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mcking65 for answering my questions.
@mcking65 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I suggest making the '$' more configurable by adding a data-prefix and data-suffix attribute to each slider thumb.
Adding an optional
data-prefix="$"
data-suffix=".00"
to each slider thumb and then replace dollarValue = '$' + value;
with
var prefix = (sliderNode.dataset.prefix) ? sliderNode.dataset.prefix : "";
var suffix = (sliderNode.dataset.suffix) ? sliderNode.dataset.suffix : "";
dollarValue = prefix + value + suffix;
@dinc5150 asks:
David, I assume this would be to support other currencies? If so, that would be a great suggestion if our goal were to make re-usable components. Building a re-usable component library is specifically a non-goal of APG. The primary goal is illustrating accessibility practices as clearly as possible, so we intentionally avoid adding complexity to the code that you would find in production-ready component libraries. Even though your suggestion is simple and represents trivial complexity for the level of configurability benefit, we'd still avoid it unless we needed that configurability to illustrate an accessibility feature. Please let me know if I am misunderstanding your intent. |
Thanks @mcking65 , Yes, my intent was to make the code more useable, and wasn't aware that it wasn't something that the APG wanted. My use case for the component was to append "mm" to the number instead of using currency. If the goal is to illustrate as clearly as possible without adding complexity, rather than a reusable component, I would recommend removing the $ all together as the currency does not add value to the code or best practices. |
Updated multi-thumb slider example:
event.key
, instead ofevent.keyCode
aria-valuetext
Preview multi-thumb slider
Review checklist
Preview | Diff