-
Notifications
You must be signed in to change notification settings - Fork 273
feat(ui5-range-slider): focus and keyboard handling implementation #2620
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
feat(ui5-range-slider): focus and keyboard handling implementation #2620
Conversation
The Slider is now focusable, the element that gets the focus when the component is active is the slider's handle. A new private property 'focused' is added. The full keyboard handling specifications are implemented.
5b8f2ff
to
3c5a249
Compare
d66f5f8
to
3e7dacc
Compare
The Range Slider is now focusable, the elements that gets the focus when the component is active are the slider's handles and progress tracker. The full keyboard handling specifications are implemented.
3e7dacc
to
e7130cc
Compare
-- onEnterDom() moved from Slider.js to SliderBase.js -- A couple of keyboard handling rare cases are fixed -- The private 'focus' property is removed as it is no longer used -- Keyboard interactions with inactive Slider (with step 0) are prevented -- Refactoring of the logic about actions onto the selected range
|
…ransparent background of the handles
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 review is related to the code of the change rather than to the behaviour of the component
} | ||
|
||
get tabIndexProgress() { | ||
return this.tabIndex; |
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.
Do you really need a getter for a property?
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.
In the upcoming accessibility commit implementing the aria attributes according to the standards we are removing both this getter and the tabindex private property because they will be be no longer needed in results of a couple template changes of the Slider and & Range Slider components.
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.
LGTM, someone from @SAP/ui5-webcomponents-topic-rl should approve the behaviour
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.
I'm fine with the current behaviour
The Range Slider is now focusable, the elements that gets the focus when
the component is active are the progress bar and the two handles. A new private property
'focused' is added.
The full keyboard handling specifications are implemented:
[TAB]
Forward navigation-- On entering, move focus to the progress bar.
-- If the focus is on the progress bar move it to the left handle
-- If the focus is on the left handle move it to the right handle
-- If focus is on the right handle, leave Range Slider
[SHIFT] + [TAB]
Backward navigation-- On entering, move focus to the right handle.
-- If the focus is on the right handle move it to the left handle
-- If the focus is on the left handle move it to the progress bar
-- If focus is on the left handle, leave Range Slider
[RIGHT], [UP], or [+]
Increases the value of the Range Slider by a small increment.-- The focused Range Slider handle moves to the right/ up by the according value.
-- If the focused Range Slider handle is at the maximum value position, do nothing.
-- If the focus is on the whole selected range move it with the offset by the according value.
[LEFT], [DOWN], or [-]
Decreases the value of the Range Slider by a small increment-- The focused Range Slider handle moves to the left/ down by the according value.
-- If the focused Range Slider handle is at the minimum value position, do nothing.
-- If the focus is on the whole selected range move it with the offset by the according value.
[CTRL]+[RIGHT], [CTRL]+[UP], or [PAGE UP]
Increases the value of the Range Slider by a large increment-- The focused Range Slider handle moves to the right/ up accordingly.
-- If the focused Range Slider handle is at the maximum value position, do nothing.
-- If the focus is on the whole selected range move it with the offset by the according value.
[CTRL]+[LEFT], [CTRL]+[DOWN], or [PAGE DOWN]
Decreases the value of the Range Slider by a large increment.-- The focused Range Slider handle moves to the left/ down accordingly.
-- If the focused Range Slider handle is at the minimum value position, do nothing.
-- If the focus is on the whole selected range move it with the offset by the according value.
[HOME]
Sets the minimum value. The Range Slider handles or progress bar move to the leftmost/ bottommost position.[END]
Sets the maximum value. The Range Slider handles or progress bar move to the rightmost/ topmost position.[ESC]
If focus is on a thumb, revert this thumb to the value which it had when it got the focus.