Repository navigation
Announce card action buttons as buttons, describe pressed actions as Selected - #5900
Merged
Merged
Conversation
Collaborator
Author
|
I'll do validation tomorrow. |
11 tasks
Eugene (OEvgeny)
force-pushed
the
OEvgeny/fix-card-action-pressed-state
branch
2 times, most recently
from
October 19, 2026 00:37
dd60494 to
593accf
Compare
2 of 11 tasks
Eugene (OEvgeny)
force-pushed
the
OEvgeny/fix-card-action-pressed-state
branch
2 times, most recently
from
October 19, 2026 08:23
474cde1 to
adf6f48
Compare
Eugene (OEvgeny)
marked this pull request as ready for review
October 19, 2026 19:29
Eugene (OEvgeny)
requested review from
William Wong (compulim),
Chris Whitten (cwhitten) and
TJ Durnford (tdurnford)
as code owners
October 19, 2026 19:29
Collaborator
Author
added 6 commits
October 19, 2026 15:42
The comments named Action.ShowUrl, but the code exempts buttons with aria-expanded, which is Action.ShowCard.
…Selected Card action buttons had aria-pressed, so screen readers announced them as toggle buttons that never turn off (#5716, #5719, #5745, #5750). They are now plain buttons; pressed actions are described as "Selected" via aria-describedby, which keeps the choice announced (#3622), and is styled via the adaptive-card-renderer__action--selected class instead of [aria-pressed='true'] in the default and Fluent themes.
An Action.Submit whose required inputs fail validation is not executed by Adaptive Cards, but the capture-phase click handler still marked it as selected. Mark the action from onExecuteAction instead.
Eugene (OEvgeny)
force-pushed
the
OEvgeny/fix-card-action-pressed-state
branch
from
October 19, 2026 22:43
748f85c to
b5870f4
Compare
Collaborator
Author
Collaborator
Author
|
Follow-up: prototype immediate button selected state announcement |
2 of 11 tasks
William Wong (compulim)
previously approved these changes
Oct 20, 2026
added 3 commits
October 20, 2026 15:49
# Conflicts: # __tests__/html2/richCard/heroCard.pushButton.focusVisible.html
Eugene (OEvgeny)
dismissed
William Wong (compulim)’s stale review
via
October 20, 2026 23:16
dd3875d
Eugene (OEvgeny)
enabled auto-merge (squash)
October 20, 2026 23:22
William Wong (compulim)
approved these changes
Oct 20, 2026
Eugene (OEvgeny)
pushed a commit
that referenced
this pull request
Oct 21, 2026
…on main #5900 removed the capture-phase click listener from the card root, so Chrome now leaves the role-less card out of the accessibility tree (role "none") instead of exposing it as "generic". Assert that neither card is a "figure" or a "form" instead. The live region now reads the text of cards without "speak" (#5922), update the snapshot.
Eugene (OEvgeny)
added a commit
that referenced
this pull request
Oct 21, 2026
…nter on clickable elements (#5915) * Do not set role="figure" on Adaptive Cards without a label A card without "speak" has no name, and an unnamed "figure" or "form" is announced without its content. Set the role only when the card has a label, fixes #5049. * Show a pointer cursor on clickable Adaptive Card elements Containers and images with "selectAction" get cursor: pointer; push buttons keep the default cursor, fixes #5130. * Add PR number to changelog * Show the live region copy in role mod snapshots * Give the second card in hack.roleMod.html a distinct speak Both cards had speak 'Hello, World!', so the live region snapshot read the same line twice. * Move the changelog entry to .changelog/ * Fix unlabelled role mod test for card action and live region changes on main #5900 removed the capture-phase click listener from the card root, so Chrome now leaves the role-less card out of the accessibility tree (role "none") instead of exposing it as "generic". Assert that neither card is a "figure" or a "form" instead. The live region now reads the text of cards without "speak" (#5922), update the snapshot. --------- Co-authored-by: Eugene Olonov <eugeneolonov@microsoft.com>
Eugene (OEvgeny)
added a commit
that referenced
this pull request
Oct 21, 2026
* Name Action.ShowCard as the exception in Adaptive Card hack comments The comments named Action.ShowUrl, but the code exempts buttons with aria-expanded, which is Action.ShowCard. * Announce card action buttons as buttons, describe pressed actions as Selected Card action buttons had aria-pressed, so screen readers announced them as toggle buttons that never turn off (#5716, #5719, #5745, #5750). They are now plain buttons; pressed actions are described as "Selected" via aria-describedby, which keeps the choice announced (#3622), and is styled via the adaptive-card-renderer__action--selected class instead of [aria-pressed='true'] in the default and Fluent themes. * Add PR number to changelog * Select card actions only after Adaptive Cards performed them An Action.Submit whose required inputs fail validation is not executed by Adaptive Cards, but the capture-phase click handler still marked it as selected. Mark the action from onExecuteAction instead. * Shorten the changelog entry * Snapshot every key step in ariaPushed.html * Wait for the live region to clear before the accessibility check in selectedAction.validation.html * Announce "Selected" when a card action is pressed Screen readers do not re-read the description of the focused button after it changed, so the "Selected" description added in #5900 was only heard on revisit. Queue "Selected" in the live region once Adaptive Cards executed the action (after validation passed), via the existing live region twin. * Add PR number to changelog * Test that pressing a selected card action again announces "Selected" again * Move the changelog entry to .changelog/ * Move the changelog entry to .changelog/ --------- Co-authored-by: Eugene Olonov <eugeneolonov@microsoft.com>
This was referenced Oct 21, 2026
[White Label - Card Wizard]: Narrator is not announcing the label information for Name button.
#5720
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Changelog Entry
Changed
adaptive-card-renderer__action--selectedclass instead of[aria-pressed='true']: host CSS that targets.ac-pushButton[aria-pressed='true']should target.ac-pushButton.adaptive-card-renderer__action--selectedinstead, in PR #5900, by @OEvgenyFixed
Description
Card action buttons had
aria-pressed("toggle button"), and Submit was marked pressed even when validation failed. They are now plain buttons: the action Adaptive Cards performed is described as "Selected" viaaria-describedby(#3622) and styled with a class.Design
onExecuteAction, not a click handler, so actions Adaptive Cards did not perform stay unselected.Specific Changes
useActionShouldBePushButtonModEffect,AdaptiveCardRenderer,en-US.json: mark the executed action, hidden "Selected" textCSS (default, Fluent, style set),
cardPushButton*JSDoc: style by classdurableAddClassWithUndo: several classes; removedclosestponyfill; comment fixesselectedAction.html(+ Fluent, Copilot): snap 1, "Default" selectedselectedAction.validation.html: snap 1, failed Submit unselected; 2, selected once filledariaPushed.html: snaps 1–7, Yes → No → Submit, ENTER selects it, back to Yes, ENTER selects bothhack.actionShouldBePushButtonMod.html,heroCard.pushButton.focusVisible.html: assert "Selected"I have added tests and executed them locally
I have added
.changelog/<PR#>-<slug>.mdI have updated documentation
Review Checklist
z-index)package.jsonandpackage-lock.jsonreviewed