RAC: Menu
component focus-visible behavior (inconsistent?)
#5748
-
In our project we try to normalize We normalize it this way: :focus-visible:where([data-rac]) {
outline: none;
}
:focus-visible:where(:not([data-rac])),
[data-focus-visible] {
outline: red solid 2px;
} This mostly works well and lets us not have to define custom Also, we don't have to While doing this, we noticed some inconsistency with using When triggering the menu via mouse:In this case, the And since When triggering the menu via keyboard:In this case, the first Reprohttps://codesandbox.io/p/sandbox/pensive-germain-q68z48?file=%2Fsrc%2FApp.js%3A24%2C19 Questions
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
data-rac
comes from our use ofrenderProps
, but I think an argument could be made for it also being at the top level of any component, in which case Menu is just missing it.