Skip to content

Tabs: "With Tab Icons" story has duplicated focus styles #63271

Closed

Description

@mirka

What problem does this address?

The Tabs "With Tab Icons And Tooltips" story has duplicated focus styles.

Icon tabs with duplicate focus styles

What is your proposed solution?

Ideally, we switch the documented implementation to something that doesn't result in double focus indicators. We shouldn't add overrides to avoid this double focus, if possible.

Activity

  1. ciampo commented on Jul 9, 2024

    @ciampo
    Contributor

    Yup, this is caused by the <Button /> styles interfering with Tabs

    It's a tricky one. We'll probably have to add specific style overrides in the Tabs component to make sure that the relevant <Button /> styles don't get applied.

    Do you have any other thoughts?

  2. mirka commented on Jul 9, 2024

    @mirka
    MemberAuthor

    I was hoping to compose it using existing components, without style overrides. For example, this seems to work as expected:

    <Tooltip text="WordPress">
    	<Tabs.Tab tabId="tab1" aria-label="WordPress">
    		<Icon icon={ wordpress } />
    	</Tabs.Tab>
    </Tooltip>
  3. ciampo commented on Jul 9, 2024

    @ciampo
    Contributor

    That makes a lot of sense, it's so good to start seeing the results of composing smaller, modular components!

    I implemented your suggestion in #63297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions