-
Notifications
You must be signed in to change notification settings - Fork 273
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-slider): focus and keyboard handling implementation #2614
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.
53785a9
to
a07f2f6
Compare
…ed by it. add focusInnerElement() as a hook in SliderBase.js
Reseting with ESC doesn't relly work well. |
HOME & END don't work as expected. Focus the handle, navigate several times with just the arrow. |
The inactive slider works with HOME & END |
I fixed the problem that the inactive Slider (with step set to '0') is affected by the keyboard shortcuts, but cannot reproduce the the first two described issues with ESC, HOME and END keys. |
-- onEnterDom() moved from Slider.js to SliderBase.js -- The Slider's handle is now focused via UI5Element getFocusDomRef() -- The private 'focus' property is removed as it is no longer used -- Keyboard interactions with inactive Slider (with step 0) are prevented
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:
[TAB]
Forward navigation-- On entering, move focus to the Slider.
-- If focus is on the Slider, move focus to the next element within the tab chain after the Slider.
[SHIFT] + [TAB]
Backward navigation-- On entering, move focus to the Slider.
-- If focus is on the Slider, move focus to the previous element within the tab chain before the Slider.
[RIGHT], [UP], or [+]
Increases the value of the Slider by a small increment.-- The Slider Thumb moves to the right/ up by the according value.
-- If the Slider Handle (Thumb) is at the maximum value position, do nothing.
[LEFT], [DOWN], or [-]
Decreases the value of the Slider by a small increment-- The Slider Thumb moves to the left/ down by the according value.
-- If the Slider Thumb is at the minimum value position, do nothing.
[CTRL]+[RIGHT], [CTRL]+[UP], or [PAGE UP]
Increases the value of the Slider by a large increment-- The Slider Thumb moves to the right/ up accordingly.
-- If the Slider Thumb is at the maximum value position, do nothing.
[CTRL]+[LEFT], [CTRL]+[DOWN], or [PAGE DOWN]
Decreases the value of the Slider by a large increment.-- The Slider Thumb moves to the left/ down accordingly.
-- If the Slider Thumb is at the minimum value position, do nothing.
[HOME]
Sets the minimum value. The Slider Thumb moves to the leftmost/ bottommost position.[END]
Sets the maximum value. The Slider Thumb moves to the rightmost/ topmost position.[ESC]
Sets the Slider back to the value which it had when it got the focus.