Skip to content

Commit

Permalink
Merge branch 'main' into dev/eyadon/8581-SelectActionCrashWPF
Browse files Browse the repository at this point in the history
  • Loading branch information
jwoo-msft authored Jul 18, 2023
2 parents f008496 + 7f38a8d commit 3207ffa
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
4 changes: 2 additions & 2 deletions source/ios/tools/AdaptiveCards.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|
spec.name = 'AdaptiveCards'

spec.version = '2.9.1'
spec.version = '2.9.2'

spec.license = { :type => 'Adaptive Cards Binary EULA', :file => 'source/EULA-Non-Windows.txt' }

Expand All @@ -11,7 +11,7 @@ Pod::Spec.new do |spec|

spec.summary = 'Adaptive Cards are a new way for developers to exchange card content in a common and consistent way'

spec.source = { :git => 'https://github.com/microsoft/AdaptiveCards.git', :tag => 'ios-v2.9.1' }
spec.source = { :git => 'https://github.com/microsoft/AdaptiveCards.git', :tag => 'ios-v2.9.2' }

spec.default_subspecs = 'AdaptiveCardsCore', 'AdaptiveCardsPrivate', 'ObjectModel', 'UIProviders'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1718,3 +1718,16 @@ a.default-ac-anchor:visited:active {
visibility: hidden;
}
}

.screen-reader-only {
border: 0;
clip: rect(0,0,0,0);
clip-path: inset(50%);
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
}
6 changes: 5 additions & 1 deletion source/nodejs/adaptivecards-designer/src/card-designer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,11 @@ export class CardDesigner extends Designer.DesignContext {
text: (trigger) => JSON.stringify(this.getBoundCard(), null, 4)
})
.on("error", () => this._copyJSONButton.renderedElement.focus())
.on("success", () => this._copyJSONButton.renderedElement.focus());
.on("success", () => {
this._copyJSONButton.renderedElement.focus()

this.toolbar.addAlert("Card payload copied");
});
}

// Tool palette panel
Expand Down
12 changes: 12 additions & 0 deletions source/nodejs/adaptivecards-designer/src/toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ export class ToolbarChoicePicker extends ToolbarElement {
export class Toolbar {
private _elements: Array<ToolbarElement> = [];
private _attachedTo: HTMLElement;
private _alertPanel: HTMLDivElement;

private createSeparatorElement(): HTMLElement {
let separatorElement = document.createElement("div");
Expand Down Expand Up @@ -395,6 +396,10 @@ export class Toolbar {

this._attachedTo.appendChild(leftContainer);
this._attachedTo.appendChild(rightContainer);

this._alertPanel = document.createElement("div");
this._alertPanel.className = "screen-reader-only";
this._attachedTo.appendChild(this._alertPanel);
}

addElement(element: ToolbarElement) {
Expand Down Expand Up @@ -438,4 +443,11 @@ export class Toolbar {
// specified id
this._elements.splice(0, 0, element);
}

addAlert(alertText: string) {
var alert = document.createElement('div');
alert.innerHTML = alertText;
alert.setAttribute("aria-live", "polite");
this._alertPanel.appendChild(alert);
}
}

0 comments on commit 3207ffa

Please sign in to comment.