-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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] Replace reversed with rtl support on horizontal sliders #12972
Conversation
This follows WAI-ARIA slider authoring practices as well as the material design specs. The vertical slider is kept regardless.
6ad29a2
to
b47ba62
Compare
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.
Great!
docs/src/pages/lab/slider/slider.md
Outdated
@@ -37,7 +37,10 @@ Sliders reflect the current state of the settings they control. | |||
|
|||
## Reverse slider |
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.
Why not remove this section all together?
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 was thinking about people looking for the missing prop but the changelog entry and this PR is probably sufficient.
The reverse property was introduced in #11040. |
Just a side note here: reverse or vertical reverse was one of the main obstacles when trying to port this to native input range components. If this pr gets merged it might make sense to reconsider a native implementation |
@sakulstra What's the advantage of the native implementation? From what I understand, we get the accessibility and form submission for free. I would love to explore this path. Especially if it means simplifying the internal implementation. |
@oliviertassinari what I thought the advantages would be:
The disadvantage is, that browser implementations and feature support widely differ even in modern browsers - so getting things right is unnecessarily hard: |
…#12972) * [Slider] Replace reversed with rtl support on horizontal sliders This follows WAI-ARIA slider authoring practices as well as the material design specs. The vertical slider is kept regardless. * [docs] Remove obsolete reverse slider section
current rtl behavior @sakulstra any Idea? |
@wenduzer Did you follow the 3 steps of our RTL guide? |
@wenduzer Could you open a separate issue and follow the issue template? This looks like the behavior before this PR got merged. |
maybe npm repo isn't updated? |
Breaking change
reverse
property from theSlider
component.Fix:
Slider
interactions and thumb positions in rtl themesThis was discussed internally.
Reasons for the removal:
right-to-left
themesreverse
prop would result in 8 different combinations of the Slider just for direction and orientation. This is very error prone.Pinging @lwansbrough in case he wishes to make a more compelling case for reverse sliders.
Follow up after merge: