From 87cd2f31f22ff73dad53545f159ce64a4a583cf5 Mon Sep 17 00:00:00 2001 From: Kitty Hurley Date: Thu, 11 Aug 2022 14:04:46 -0500 Subject: [PATCH] fix(action): Assistive technology support and announcement for "active" prop --- src/components/action/action.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/action/action.tsx b/src/components/action/action.tsx index 026179166b8..9c851c1d87b 100755 --- a/src/components/action/action.tsx +++ b/src/components/action/action.tsx @@ -220,6 +220,7 @@ export class Action implements InteractiveComponent { aria-busy={toAriaBoolean(loading)} aria-disabled={toAriaBoolean(disabled)} aria-label={ariaLabel} + aria-pressed={this.active ? "true" : "false"} class={buttonClasses} disabled={disabled} ref={(buttonEl): HTMLButtonElement => (this.buttonEl = buttonEl)} @@ -240,6 +241,7 @@ export class Action implements InteractiveComponent { calciteActionClickHandler = (): void => { if (!this.disabled) { this.calciteActionClick.emit(); + this.active = !this.active; } }; }