Skip to content

Commit 4bb924b

Browse files
committed
Adds tablist-wrapper shadow part to the element wrapping the upper portion of the component
1 parent cc846d3 commit 4bb924b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ If none of the tabs have `aria-selected=true`, then the first tab will be select
4949

5050
### Parts
5151

52+
- `::part(tablist-wrapper)` is the wrapper which contains `before-tabs`, `tablist` and `after-tabs`.
5253
- `::part(tablist)` is the container which wraps all tabs. This element appears in ATs as it is `role=tablist`.
5354
- `::part(panel)` is the container housing the currently active tabpanel.
5455
- `::part(before-tabs)` is the container housing any elements that appear before the first `role=tab`. This also can be directly slotted with `slot=before-tabs`. This container lives outside the element with role=tablist to adhere to ARIA guidelines.

src/tab-container-element.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ export class TabContainerElement extends HTMLElement {
130130
const shadowRoot = this.shadowRoot || this.attachShadow({mode: 'open', slotAssignment: 'manual'})
131131
const tabListContainer = document.createElement('div')
132132
tabListContainer.style.display = 'flex'
133+
tabListContainer.setAttribute('part', 'tablist-wrapper')
133134
const tabListSlot = document.createElement('slot')
134135
tabListSlot.setAttribute('part', 'tablist')
135136
const panelSlot = document.createElement('slot')

0 commit comments

Comments
 (0)