Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
14 changes: 7 additions & 7 deletions source/nodejs/adaptivecards/src/card-elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -980,9 +980,9 @@ export class TextBlock extends BaseTextBlock {

if (this.style === "heading") {
element.setAttribute("role", "heading");

let headingLevel = this.hostConfig.textBlock.headingLevel;

if (headingLevel !== undefined && headingLevel > 0) {
element.setAttribute("aria-level", headingLevel.toString());
}
Expand Down Expand Up @@ -2832,7 +2832,7 @@ export class TextInput extends Input {
protected internalRender(): HTMLElement | undefined {
let result: HTMLInputElement | HTMLTextAreaElement;

if (this.isMultiline) {
if (this.isMultiline && this.style !== Enums.InputTextStyle.Password) {
result = document.createElement("textarea");
result.className = this.hostConfig.makeCssClassName("ac-input", "ac-textInput", "ac-multiline");

Expand Down Expand Up @@ -3355,7 +3355,7 @@ export class ChoiceSetInput extends Input {
this._textInput.placeholder = this.placeholder;
this._textInput.setAttribute("aria-label", this.placeholder);
}

let dataList = document.createElement("datalist");
dataList.id = Utils.generateUniqueId();

Expand Down Expand Up @@ -4001,7 +4001,7 @@ export abstract class Action extends CardObject {

setupElementForAccessibility(element: HTMLElement, promoteTooltipToLabel: boolean = false) {
element.tabIndex = this.isEnabled ? 0 : -1;

element.setAttribute("role", this.getAriaRole());

if (element instanceof HTMLButtonElement) {
Expand Down Expand Up @@ -4054,7 +4054,7 @@ export abstract class Action extends CardObject {
this.execute();
}
};

this._renderedElement = buttonElement;

this.renderButtonContent();
Expand Down Expand Up @@ -4862,7 +4862,7 @@ class ActionCollection {
if (afterSelectedAction) {
renderedAction.isFocusable = false;
}

if (renderedAction !== action) {
renderedAction.state = ActionButtonState.Subdued;
}
Expand Down
3 changes: 2 additions & 1 deletion source/nodejs/adaptivecards/src/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ export enum InputTextStyle {
Text,
Tel,
Url,
Email
Email,
Password
}

/*
Expand Down