Repository navigation
Prototype: announce "Selected" when a card action is pressed - #5928
Draft
Eugene (OEvgeny) wants to merge 13 commits into
Draft
Eugene (OEvgeny) wants to merge 13 commits into
Eugene (OEvgeny) wants to merge 13 commits into
Conversation
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.
…electedAction.validation.html
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
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
Fixed
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
useQueueStaticElement, as the copy button does) and Announce card action buttons as buttons, describe pressed actions as Selected #5900's "Selected" string;ariaNotifyis not in Safari.Specific Changes
AdaptiveCardRenderer: queues "Selected" whenmarkActionAsSelectedmarked the actionuseActionShouldBePushButtonModEffect:markActionAsSelectedreturns whether it marked the actionbotframework-webchat-component/internal: exportsuseQueueStaticElementselectedAction.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 againselectedAction.announcement.validation.html: snapshot 1, failed Submit announces nothing; 2, "Selected" once filledI have added tests and executed them locally
I have updated
CHANGELOG.mdI have updated documentation
Review Checklist
z-index)package.jsonandpackage-lock.jsonreviewed