Skip to content

Commit

Permalink
fix(core): tabs aria controller overwrites user aria-labelledby
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Mar 6, 2024
1 parent 608a2a8 commit 0d19f99
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/pfe-core/controllers/tabs-aria-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ export class TabsAriaController<

hostUpdated() {
for (const [tab, panel] of this.#tabPanelMap) {
if (!panel.hasAttribute('aria-labelledby')) {
panel.setAttribute('aria-labelledby', tab.id);
}
panel.setAttribute('aria-labelledby', tab.id);
tab.setAttribute('aria-controls', panel.id);
}
}
Expand Down

0 comments on commit 0d19f99

Please sign in to comment.