Skip to content

Prototype: announce "Selected" when a card action is pressed - #5928

Draft
Eugene (OEvgeny) wants to merge 13 commits into
mainfrom
OEvgeny/fix-card-action-selected-announcement
Draft

Eugene (OEvgeny) wants to merge 13 commits into
mainfrom
OEvgeny/fix-card-action-selected-announcement

Conversation

@OEvgeny

@OEvgeny Eugene (OEvgeny) commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #5900: screen readers do not announce "Selected" when the user presses a card action.

Changelog Entry

Fixed

  • Fixed "Selected" not being announced when a card action is pressed, in PR #5928, by @OEvgeny

Description

Stacked on #5900, whose "Selected" description is read only on revisit: focus stays on the pressed button and screen readers do not re-read changed descriptions. Once Adaptive Cards performed the action (validation passed), "Selected" is queued once in Web Chat's live region; role and name are unchanged.

Design

Specific Changes

  • AdaptiveCardRenderer: queues "Selected" when markActionAsSelected marked the action

  • useActionShouldBePushButtonModEffect: markActionAsSelected returns whether it marked the action

  • botframework-webchat-component/internal: exports useQueueStaticElement

  • selectedAction.announcement.html: snapshots 1–5, hero card: ENTER announces "Selected" once before "You said", TAB and SHIFT + TAB back add nothing, ENTER again performs the action and announces it again

  • selectedAction.announcement.validation.html: snapshot 1, failed Submit announces nothing; 2, "Selected" once filled

  • I have added tests and executed them locally

  • I have updated CHANGELOG.md

  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

Eugene Olonov and others added 13 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.
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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant