Skip to content

refactor(ui5-range-slider): refactor ui5-range-slider component - #13316

Merged
ndeshev merged 38 commits into
mainfrom
range-slider-refactoring
May 1, 2026
Merged

ndeshev merged 38 commits into
mainfrom
range-slider-refactoring

Conversation

@ndeshev

@ndeshev ndeshev commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor
  • Extracted reusable SliderHandle and SliderScale components from
    RangeSlider for better modularity and code reuse with Slider
  • Refactored RangeSliderTemplate to use composition with the new
    sub-components instead of inline markup
  • Added progress bar ARIA and focus properties to SliderScale to support
    RangeSlider's range selection feature
  • Consolidated and cleaned up CSS theme parameters across all themes
    (Horizon, Fiori 3, HCB/HCW variants)
  • Removed aria-keyshortcuts attributes from the handles to avoid duplicated speech output
  • Removed the wrong aria-describedby references
  • Fixes various minor issues

JIRA: BGSOFUIRILA-4268
FIXES: #13348

@ui5-webcomponents-bot

ui5-webcomponents-bot commented Mar 23, 2026 •

Copy link
Copy Markdown
Collaborator

🧹 Preview deployment cleaned up: https://pr-13316--ui5-webcomponents.netlify.app

@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview March 23, 2026 08:43 Inactive
@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview March 31, 2026 06:49 Inactive
@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview March 31, 2026 07:17 Inactive
@nikoletavnv

Copy link
Copy Markdown
Contributor

There is an issue when you click on the slider track and both start and end handle get selected and you try to move the handles using Arrow Left and Arrow Right.

  1. Go to the sample "Range Slider with steps, input tooltips, tickmarks and labels" in the RangeSlider.html page
  2. Move the start and end handle to some values - e.g. 8 and 22.
  3. Select the track somewhere in between to focus the whole range progress
  4. Try to move the range progress using Arrow Left and Arrow Right keys

Most of the times the range does not move.

  1. Sometimes when you move the range with the mouse and try again to move it with Arrow Left and Right it starts to work, but I can't find a pattern to reproduce the working path consistently

@nikoletavnv

Copy link
Copy Markdown
Contributor

The range slider has unexpected behavior when configured in the following way:
<ui5-range-slider id="edge-with-features" min="0" max="0" start-value="0" end-value="0" show-tooltip="" show-tickmarks="" ui5-range-slider="" step="1" label-interval="0" value="0" tooltip-start-value="" tooltip-end-value="0" tooltip-start-value-state="None" tooltip-end-value-state="None" _labels-overlapping=""></ui5-range-slider>

image

Even though the min and max values are set to 0 , step>=1 is creating one tickmark in the middle. I would expect no tickmark to be created in case min and max values match.

Comment thread packages/main/src/SliderHandle.ts Resolved
Comment thread packages/main/src/SliderHandle.ts Resolved
Comment thread packages/main/src/RangeSlider.ts Resolved
Comment thread packages/main/src/RangeSlider.ts Resolved
Comment thread packages/main/src/RangeSlider.ts Resolved
@nikoletavnv

Copy link
Copy Markdown
Contributor

Keyboard increase and decrease of slider start value: when the start handle reaches the end handle it goes "behind" it and the focus is visually lost. On decrease the start goes "in front of" the end handle and the focus is visible. The same happens with the end slider when increasing - it hides behind the start slider and focus is visually lost.

Screen.Recording.2026-04-20.100848.mp4

@nikoletavnv

Copy link
Copy Markdown
Contributor

HOME and END buttons - if focus is on the whole range - the range is not moved to start / end position as by spec.

@nikoletavnv

Copy link
Copy Markdown
Contributor

When focus is on the input (in case of editbale tooltip) the Figma specs mention that DEL deletes the whole value in the input. We can double check with the design if this is the desired behavior, because the input text is not "selected" when we focus it by pressing F2

@nikoletavnv

Copy link
Copy Markdown
Contributor

By Figma spec - if a handle is focused, pressing a number on the keyboard (or several numbers in a short time interval) should move the handle to that position ( if applicable ) on the scale.

@nikoletavnv

Copy link
Copy Markdown
Contributor

JAWS:

  • When focus is on the end-handle , after the reader announces the current value, min and max and what to do to change the value, there is announcement "F2" at the end. It is only announced for the end-handle and not the start handle. The difference is that the end handle has aria-keyshortcuts="F2" attribute which is not present in the start handle element.
    In case the tooltip is not editable should we have this attribute at all? Also when tooltip is editable there is a separate announcement that informs the users that they should press F2 to focus the input and again at the end "F2" is announced.
  • By Figma spec there should be announcements for disabled range slider. BUT the disabled slider is not not focusable at all. I think the specs should be modified.

@ndeshev
ndeshev marked this pull request as ready for review April 21, 2026 12:07
@ndeshev

ndeshev commented Apr 22, 2026 •

Copy link
Copy Markdown
Contributor Author

The range slider has unexpected behavior when configured in the following way: <ui5-range-slider id="edge-with-features" min="0" max="0" start-value="0" end-value="0" show-tooltip="" show-tickmarks="" ui5-range-slider="" step="1" label-interval="0" value="0" tooltip-start-value="" tooltip-end-value="0" tooltip-start-value-state="None" tooltip-end-value-state="None" _labels-overlapping=""></ui5-range-slider>

image Even though the min and max values are set to 0 , step>=1 is creating one tickmark in the middle. I would expect no tickmark to be created in case min and max values match.

This is not a valid use case, apps should prevent it.

@UI5 UI5 deleted a comment from nikoletavnv Apr 22, 2026
@ndeshev

ndeshev commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

Keyboard increase and decrease of slider start value: when the start handle reaches the end handle it goes "behind" it and the focus is visually lost. On decrease the start goes "in front of" the end handle and the focus is visible. The same happens with the end slider when increasing - it hides behind the start slider and focus is visually lost.

Screen.Recording.2026-04-20.100848.mp4

this behavior is the same in the main branch, we should discuss it and eventually raise an issue

@ndeshev

ndeshev commented Apr 22, 2026 •

Copy link
Copy Markdown
Contributor Author

When focus is on the input (in case of editbale tooltip) the Figma specs mention that DEL deletes the whole value in the input. We can double check with the design if this is the desired behavior, because the input text is not "selected" when we focus it by pressing F2

We have never implemented that "feature", which by itself is a bit strange imo.

@ndeshev

ndeshev commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

By Figma spec - if a handle is focused, pressing a number on the keyboard (or several numbers in a short time interval) should move the handle to that position ( if applicable ) on the scale.

Also not yet implemented.

@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview April 23, 2026 08:15 Inactive
remove aria-keyshortcuts attr from the handles
@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview April 29, 2026 20:19 Inactive
Comment thread packages/main/src/SliderHandle.ts Resolved
@niyap

niyap commented Apr 29, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-04-30 at 0 27 32 Look at the second tooltip. It does not correspond to the step precision.

@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview April 30, 2026 06:55 Inactive
@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview April 30, 2026 09:29 Inactive
@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview April 30, 2026 11:00 Inactive
@ndeshev

ndeshev commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

Screenshot 2026-04-30 at 0 27 32 Look at the second tooltip. It does not correspond to the step precision.

fixed

@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview April 30, 2026 11:51 Inactive
@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview April 30, 2026 12:44 Inactive
@ndeshev

ndeshev commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

Screenshot 2026-04-30 at 0 27 32 Look at the second tooltip. It does not correspond to the step precision.

fixed

@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview April 30, 2026 19:19 Inactive

@niyap niyap left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for your patience! Now, everything looks correct :)

@ndeshev
ndeshev dismissed nikoletavnv’s stale review May 1, 2026 05:20

Comments are applied

@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview May 1, 2026 06:40 Inactive
@ndeshev
ndeshev merged commit 4727fb5 into main May 1, 2026
19 of 21 checks passed
@ndeshev
ndeshev deleted the range-slider-refactoring branch May 1, 2026 06:58
@ui5-webcomponents-bot
ui5-webcomponents-bot temporarily deployed to preview May 1, 2026 06:58 Inactive

This branch was previously deployed

1 inactive deployment
preview — e71eec3d Deployed May 1, 2026 by ui5-webcomponents-bot
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.

[RangeSlider] accessible-name not set correctly

4 participants