Skip to content

Tabs automatically indexing on page load #612

Closed
@benpatersonx

Description

Describe the bug
When you load a page using the tabs component, the first item automatically appears with a focus ring around it or 'indexed' even though it should simply just show as selected. I believe it is an issue with the tab index.

To Reproduce
Steps to reproduce the behavior:

  1. Use the 'Tabs' component from flowbite-react (src/lib/components/Tab/Tabs.tsx)
  2. Load/reload the page
  3. You'll see that the first tab item is automatically focused/indexed (see screenshots)

Expected behavior
All tabs should appear the same until the user interacts with them, apart from the first which should simply be selected not focused like it is.

Screenshots
image

System information:

  • Device: Desktop PC
  • Resolution: 2560 x 1440
  • OS: Windows
  • Browser: Google Chrome
  • Version: 109.0.5414.120

Project information:

  • Tailwind: 3.2.7
  • Flowbite: 1.6.3
  • Flowbite React: 0.3.8
  • Type: NextJS

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't workingconfirmedThis bug was confirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions