Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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: 2 additions & 2 deletions source/nodejs/adaptivecards-controls/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export class Constants {
enter: "Enter",
escape: "Escape",
space: " ",
up: "Up",
down: "Down",
up: "ArrowUp",
down: "ArrowDown",
delete: "Delete"
} as const;
}
6 changes: 4 additions & 2 deletions source/nodejs/adaptivecards-controls/src/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class DropDownItem {
this._element = document.createElement("span");
this._element.className = "ms-ctrl ms-ctrl-dropdown-item";
this._element.innerText = this.value;
this._element.setAttribute("role", "option");
this._element.setAttribute("role", "menuitem");
this._element.setAttribute("aria-selected", "false");
this._element.onmouseup = (e) => { this.click(); };
this._element.onkeydown = (e) => {
Expand Down Expand Up @@ -73,7 +73,7 @@ export class DropDownPopupControl extends PopupControl {
protected renderContent(): HTMLElement {
var element = document.createElement("div");
element.className = "ms-ctrl ms-popup";
element.setAttribute("role", "listbox");
element.setAttribute("role", "menu");

var selectedIndex = this._owner.selectedIndex;

Expand Down Expand Up @@ -238,6 +238,8 @@ export class DropDown extends InputWithPopup<DropDownPopupControl, DropDownItem>
if (ariaLabelledByIds.length > 0) {
this.rootElement.setAttribute("aria-labelledby", ariaLabelledByIds.join(" "));
}

this.rootElement.setAttribute("role", "menu");
}

popup() {
Expand Down
12 changes: 6 additions & 6 deletions source/nodejs/adaptivecards/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions source/nodejs/adaptivecards/src/card-elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4667,7 +4667,7 @@ class ActionCollection {
let buttonStrip = document.createElement("div");
buttonStrip.className = hostConfig.makeCssClassName("ac-actionSet");
buttonStrip.style.display = "flex";
buttonStrip.setAttribute("role", "group");
buttonStrip.setAttribute("role", "menubar");

if (orientation == Enums.Orientation.Horizontal) {
buttonStrip.style.flexDirection = "row";
Expand Down Expand Up @@ -4755,7 +4755,7 @@ class ActionCollection {
if (actionButton.action.renderedElement) {
actionButton.action.renderedElement.setAttribute("aria-posinset", (i + 1).toString());
actionButton.action.renderedElement.setAttribute("aria-setsize", allowedActions.length.toString());
actionButton.action.renderedElement.setAttribute("role", "listitem");
actionButton.action.renderedElement.setAttribute("role", "menuitem");

if (hostConfig.actions.actionsOrientation == Enums.Orientation.Horizontal && hostConfig.actions.actionAlignment == Enums.ActionAlignment.Stretch) {
actionButton.action.renderedElement.style.flex = "0 1 100%";
Expand Down
6 changes: 3 additions & 3 deletions source/nodejs/adaptivecards/src/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ export class Strings {
elementAlreadyParented: () => "The element already belongs to another container.",
actionAlreadyParented: () => "The action already belongs to another element.",
elementTypeNotStandalone: (typeName: string) => `Elements of type ${typeName} cannot be used as standalone elements.`
} as const;
};
static readonly hints = {
dontUseWeightedAndStrecthedColumnsInSameSet: () => "It is not recommended to use weighted and stretched columns in the same ColumnSet, because in such a situation stretched columns will always get the minimum amount of space."
} as const;
};
static readonly defaults = {
inlineActionTitle: () => "Inline Action"
} as const;
};
}