[slider] Migrate to use .focus({ focusVisible: false }) once available
- Dominant language
- TypeScript
- Stars
- 10.9k
- Forks
- 543
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 101
Description
## Current behavior
Because of this annoying default behavior of the platform: https://github.com/w3c/csswg-drafts/issues/5885. We had to add this defer logic: https://github.com/mui/base-ui/blob/a2360dfacdaf8e410ebe558c2f8fc4e3d9078b37/packages/react/src/slider/control/SliderControl.tsx#L391-L393
## Expected behavior
It would be better for bundle size, code complexity, to remove this (remove the extra code, remove the `waitFor()` in the tests, etc.). Instead it would be ideal to use https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#focusvisible.
But it's **on hold** for now, we are waiting for enough browser support https://caniuse.com/mdn-api_htmlelement_focus_options_focusvisible_parameter. Chromium is the biggest offender, the implementation request: https://issues.chromium.org/issues/40834435.
Contributor guide
Assessment
This issue has not been assessed yet.