focus-within styles showing on initial mount of sidebar/sheet on mobile devices #5928
dsmikeyorke
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, I'm currently using the sidebar component (which is amazing!!) to achieve a mobile navigation. I have a close trigger since the sidebar spans the full width of the viewport. On my phone I noticed that when I initially open the sidebar it focuses on the close trigger which is great but for some reason this is registering as "focus-visible" on mobile so I can see the focus-visible styles. I'd like to know if anyone found a way to prevent mobile devices from showing the focus-visible styles since the tigger was initiated by a tap and not through any sort of keyboard navigation. Ideally I would like to achieve this without preventing the focus on open or hiding the focus-visible styles on mobile devices to retain the high level of accessibility that this component offers.
Beta Was this translation helpful? Give feedback.
All reactions