Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/js/tab/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,14 @@ class TabsElement extends HTMLElement {

// Create tab button
const tabButton = document.createElement('button');
tabButton.setAttribute('id', `${tab.id}-tab`);
Comment thread
brianteeman marked this conversation as resolved.
Resolved
tabButton.setAttribute('aria-selected', !!tab.hasAttribute('active'));
tabButton.setAttribute('aria-controls', tab.id);
tabButton.setAttribute('role', 'tab');
tabButton.setAttribute('type', 'button');
tabButton.setAttribute('tabindex', -1);
tabButton.innerHTML = `${tab.getAttribute('name')}`;
tab.setAttribute('aria-labelledby', tabButton.id);

if (tab.hasAttribute('active')) {
tabButton.setAttribute('tabindex', 0);
Expand Down Expand Up @@ -330,6 +332,8 @@ class TabsElement extends HTMLElement {

// Create tab button
const tabButton = document.createElement('button');
tabButton.setAttribute('id', `${tab.id}-tab`);
tab.setAttribute('aria-labelledby', tabButton.id);
tabButton.setAttribute('aria-expanded', !!tab.hasAttribute('active'));
tabButton.setAttribute('aria-controls', tab.id);
tabButton.setAttribute('role', 'tab');
Expand Down
Loading