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

feat: Allow non-tab elements in the tabs component tablist #6755

Closed
RehanSaeed opened this issue Jun 6, 2023 · 2 comments
Closed

feat: Allow non-tab elements in the tabs component tablist #6755

RehanSaeed opened this issue Jun 6, 2023 · 2 comments
Labels
closed:not-actionable There is no action to be taken in response to this issue.

Comments

@RehanSaeed
Copy link

RehanSaeed commented Jun 6, 2023

🙋 Feature Request

I have the requirement to add headings to groups of tabs e.g. like so. I want to be able to add content to the tab slot which is not a fluent-tab. In my case I'd like to add a h2 tag.

image

🤔 Expected Behavior

Any non-fluent-tab content should not be treated like a tab.

😯 Current Behavior

My h2 tags are treated like they are tabs and things like aria-selected etc. are added to it:

image

💁 Possible Solution

I cannot use the start and end slots because I also want to add headings in between tabs.

Only look for fluent-tab components to apply customize. I currently set aria-disabled="true" on my h2 tag to work around this issue, as this causes the element to be ignored by the fluent-tabs component.

@RehanSaeed RehanSaeed added the status:triage New Issue - needs triage label Jun 6, 2023
@chrisdholt
Copy link
Member

Thanks for the issue - I'm hesitant to support this feature specifically because the tabs slot in as a direct child of a tablist which only specifies elements with a role of tab as allowed children: https://w3c.github.io/aria/#tablist. If an element with a different role were to be slotted I would expect a violation to occur.

@chrisdholt
Copy link
Member

Closing per the above.

@chrisdholt chrisdholt added closed:not-actionable There is no action to be taken in response to this issue. and removed status:triage New Issue - needs triage labels Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:not-actionable There is no action to be taken in response to this issue.
Projects
None yet
Development

No branches or pull requests

2 participants