Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

馃悰Bug: Weird focus behavior on anchor element inside dialog #173

Open
newtonyan opened this issue Jul 8, 2023 · 0 comments
Open

馃悰Bug: Weird focus behavior on anchor element inside dialog #173

newtonyan opened this issue Jul 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@newtonyan
Copy link

Describe the bug
When an anchor element is put inside the dialog (modal = true), the default focus ring of my browser doesn't show up when I TAB through the elements. But it can match the class focus-visible:text-red-500 and become red text.

However, if I force the :focus-visible state in the dev tool, the focus ring shows up and the text turns red.

To Reproduce
Steps to reproduce the behavior:

  1. Copy the example code from https://www.radix-svelte.com/docs/dialog
  2. Add <a href="/" class="focus-visible:text-red-500">Anchor</a> before the fieldset
  3. Open the dialog
  4. Tab through the elements

Current Behavior
The text inside the anchor elment became red but the default focus outline from the browser doesn't show up.

Expected behavior
The text inside the anchor elment should become red and the anchor element should have a default focus outline from the browser.

Desktop:

  • OS: macOS Ventura 13.4
  • Browser: Chrome
  • Version: 114.0.5735.198
@newtonyan newtonyan added the bug Something isn't working label Jul 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant