From e17f4a1fddf95a2c39ae9e6409d602bc1efebadb Mon Sep 17 00:00:00 2001 From: Stephane Comeau Date: Tue, 23 Jan 2024 16:20:13 -0800 Subject: [PATCH] narrator hack --- packages/web-components/fast-foundation/src/tabs/tabs.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/web-components/fast-foundation/src/tabs/tabs.ts b/packages/web-components/fast-foundation/src/tabs/tabs.ts index 9c06d68a1b5..7ee6da10638 100644 --- a/packages/web-components/fast-foundation/src/tabs/tabs.ts +++ b/packages/web-components/fast-foundation/src/tabs/tabs.ts @@ -369,6 +369,13 @@ export class FASTTabs extends FASTElement { if (tabElement) { if (tabId === this.activeid) { activeTab = tabElement; + tabElement.setAttribute("role", "tab"); + tabElement.setAttribute("aria-posinset", `${index + 1}`); + tabElement.setAttribute("aria-setsize", `${this.tabOrder.length}`); + } else { + tabElement.removeAttribute("role"); + tabElement.removeAttribute("aria-posinset"); + tabElement.removeAttribute("aria-setsize"); } // If the original property isn't emptied out, // the next set will morph into a grid-area style setting that is not what we want