leongersen/noUiSlider

Disable tabindex when slider is disabled

mitar opened this issue · 3 comments

mitar commented

When I call slider.setAttribute('disabled', true), I can still focus handles (but I cannot move them, as expected). Ideally, they would not be focusable anymore. Sadly, keyboardSupport is not among options which I could update to do this manually, either, when disabling the slider.

mitar commented

Sadly manually disabling by doing:

  for (const handle of slider.querySelectorAll(".noUi-handle")) {
    handle.setAttribute("tabindex", -1)
  }

does not work for me because handles are not always already created at the time I might want to disable slider.

In 15.7.0, there are now API methods to enable/disable a slider. This also takes care of the tabindex on handles.

Thanks for contributing!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.