From 505e910a8ecdc19054c2903de6801c82b817fdff Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 23 Nov 2021 10:47:42 -0800 Subject: [PATCH] [JS] Remove `role='menubar'` and `role='menuitem'` from `ActionCollection` (#6763) Fixes #6425 Fixes #6019 Related #4859 --- source/nodejs/adaptivecards/src/card-elements.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/source/nodejs/adaptivecards/src/card-elements.ts b/source/nodejs/adaptivecards/src/card-elements.ts index 3e0ccc664d..2baccbc450 100644 --- a/source/nodejs/adaptivecards/src/card-elements.ts +++ b/source/nodejs/adaptivecards/src/card-elements.ts @@ -5001,7 +5001,6 @@ class ActionCollection { let buttonStrip = document.createElement("div"); buttonStrip.className = hostConfig.makeCssClassName("ac-actionSet"); buttonStrip.style.display = "flex"; - buttonStrip.setAttribute("role", "menubar"); if (orientation == Enums.Orientation.Horizontal) { buttonStrip.style.flexDirection = "row"; @@ -5108,12 +5107,6 @@ class ActionCollection { action.render(); if (action.renderedElement) { - if (primaryActions.length > 1) { - action.renderedElement.setAttribute("aria-posinset", (i + 1).toString()); - action.renderedElement.setAttribute("aria-setsize", primaryActions.length.toString()); - action.renderedElement.setAttribute("role", "menuitem"); - } - if (hostConfig.actions.actionsOrientation == Enums.Orientation.Horizontal && hostConfig.actions.actionAlignment == Enums.ActionAlignment.Stretch) { action.renderedElement.style.flex = "0 1 100%"; }