Potential conflict between visuallyHiddenStyle and aria-hidden=true
#2872
-
🐛 Bug reportWell, I'm not an a11y expert by any means, but I've found out some weird behavior that I wondered whether is intentional or not. When using a select machine, the I'm assuming this is the expected behavior in some cases (this hidden I saw this in multiple places: zag/packages/machines/select/src/select.connect.ts Lines 361 to 370 in f6e0790 zag/packages/machines/navigation-menu/src/navigation-menu.connect.ts Lines 222 to 229 in f6e0790 While some others were "fine" (even though I wasn't sure what's the difference between them and the hidden zag/packages/machines/switch/src/switch.connect.ts Lines 101 to 112 in f6e0790 zag/packages/machines/color-picker/src/color-picker.connect.ts Lines 596 to 605 in f6e0790 🧭 Possible SolutionMaybe these specific cases should use |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
The reason we don't use display: none is that we need them to participate in form submission/change events, and we need the component to work during autofill events. |
Beta Was this translation helpful? Give feedback.
-
|
Ah, makes sense, didn't think about it, thanks! So maybe I should open an issue to the Testing Library guys instead. I'm assuming there is a standard way for this ( |
Beta Was this translation helpful? Give feedback.
The reason we don't use display: none is that we need them to participate in form submission/change events, and we need the component to work during autofill events.