Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mirka opened this issue Jul 8, 2024 · 3 comments · Fixed by #63297
Closed

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

mirka opened this issue Jul 8, 2024 · 3 comments · Fixed by #63297
Assignees
Labels
[Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Developer Documentation Documentation for developers

Comments

@mirka
Copy link
Member

mirka commented Jul 8, 2024

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.

@mirka mirka added [Type] Developer Documentation Documentation for developers [Package] Components /packages/components labels Jul 8, 2024
@ciampo
Copy link
Contributor

ciampo commented Jul 9, 2024

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?

@mirka
Copy link
Member Author

mirka commented Jul 9, 2024

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>
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 9, 2024
@ciampo
Copy link
Contributor

ciampo commented Jul 9, 2024

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
Labels
[Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Developer Documentation Documentation for developers
2 participants