Skip to content
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

Improving sliderInput accessibility #3003

Closed
wants to merge 2 commits into from

Conversation

jooyoungseo
Copy link

@jooyoungseo jooyoungseo commented Aug 14, 2020

This draft attempts to address #2845 (sliderInput accessibility) and it is still under development.

To-Do List

  • Patch IonRangeSlider.js to not set tabindex to "-1": We need to fix this to tabindex = "0" to allow keyboard tabbing focus.
  • Write a patch js to slider value changes to be announced to screen readers: see Deque University and aria practice.

@itsozz
Copy link

itsozz commented Aug 17, 2020

When testing this widget using WAVE "very low contrast" errors and "small text" alerts are reported. The small text alerts are reported for all elements except the current slider value(s) displayed above the 'thumb' control(s) and the very low contrast errors are for all. The number of errors and alerts reported depends on whether you have the grid number markings displayed or not, and if so - how many there are.

I've used the following CSS to overcome these issues. (NOTE: although the slider bar colour doesn't cause an error, I've changed it to maintain consistency with the current slider value(s) background which does require modification.)

/* slider scale, min and max numbers */
.irs-grid-text, .irs-min, .irs-max {
    color: #333;
    font-size: 0.8em;
}   
                               
/* value(s) of slider appearing above the 'thumb' control(s) */
.irs-from, .irs-to, .irs-single {
    background-color: #5d77a3;
    color: #fff;
}
                               
/* slider highlighted/filled range */
.irs-bar, .irs-bar-edge {
    background-color: #5d77a3;
}

@sasscal-dwd-apps
Copy link

Dear Developers,
I am also very interested on this topic, since I am developing different Apps with Shiny, and they all should be "accessible". I was also trying to use "noUISliderInput" instead of "sliderInput", but it is also inaccessible with the keyboard (at least using "tab")
Looking forward to seeing the solution on this issue.

@cpsievert
Copy link
Collaborator

I'll take this over the finish line in #3011, thanks @jooyoungseo!

@cpsievert cpsievert closed this Aug 20, 2020
@tpetzoldt
Copy link

I came across the same problem (keyboard accessibility of sliderInput) and tested it again right now, so I want to ask if there was any progress in the meantime. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants