Sharcoux / slider

React-Native and React-Native-Web compatible slider
ISC License
156 stars 31 forks source link

[RangeSlider] The accessibility of the min thumb doesn't seem to work #95

Closed linhvovan29546 closed 4 months ago

linhvovan29546 commented 5 months ago

Describe the bug The accessibility of the min thumb doesn't seem to work; it appears that only accessibility for the max thumb is supported

To Reproduce

Expected behavior The accessibility should work for both the min and max thumbs as expected.

Screenshots

Screen Recording 2024-04-26 at 4 45 03 PM

Please complete the following information:

Additional context I can not reproduce on Snack, so i reproduce on my website. Noted: I used this example to reproduce

linhvovan29546 commented 5 months ago

@Sharcoux My approach is that we need to detect which thumb component is currently focused, and whenever the handleAccessibilityKeys function is invoked, we check which thumb (min/max) is in focus to increment or decrement the value accordingly. If my approach is correct, may I create a PR for it?

Sharcoux commented 5 months ago

I fixed it. Please test version 7.2.0 and report any issue you might encounter.

linhvovan29546 commented 5 months ago

Thanks @Sharcoux , I've tested on v7.2.0, and it seems okay. However, I have a question: the accessibility action does not increase or decrease if the min or max thumb is in the same position despite crossingAllowed being set to true(Please view the attached video for clarity). Additionally, I noticed there is a console.loghere (I think you are missing that), could you remove it?

Sharcoux commented 5 months ago

Ok, I fixed some problems. However, having the accessibility actions enable the thumbs to cross would require major changes that I'm not ready to implement. You can give it a try if you want and suggest a PR.

You can test the fixes in the version 7.2.1

linhvovan29546 commented 5 months ago

@Sharcoux Okay, v7.2.1 looks good to me. I'll submit a PR for this if possible

Sharcoux commented 4 months ago

I'll close this. Open a PR if you want to discuss the thumb crossing.