-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds custom middleware for rendering attachment in live region for screen reader #3548
Merged
compulim
merged 21 commits into
microsoft:master
from
compulim:feat-accessibility-narrate-attachments
Oct 26, 2020
Merged
Adds custom middleware for rendering attachment in live region for screen reader #3548
compulim
merged 21 commits into
microsoft:master
from
compulim:feat-accessibility-narrate-attachments
Oct 26, 2020
Conversation
This file contains 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
compulim
requested review from
a-b-r-o-w-n,
beyackle,
corinagum,
cwhitten,
srinaath,
tdurnford and
tonyanziano
as code owners
October 20, 2020 07:07
corinagum
reviewed
Oct 20, 2020
corinagum
reviewed
Oct 20, 2020
corinagum
reviewed
Oct 20, 2020
corinagum
reviewed
Oct 20, 2020
corinagum
reviewed
Oct 20, 2020
corinagum
reviewed
Oct 20, 2020
corinagum
reviewed
Oct 20, 2020
@@ -40,6 +40,15 @@ | |||
"ACTIVITY_STATUS_TIMESTAMP_YESTERDAY": "Yesterday", | |||
"ADAPTIVE_CARD_ERROR_BOX_TITLE_PARSE": "Adaptive Card parse error", | |||
"ADAPTIVE_CARD_ERROR_BOX_TITLE_RENDER": "Adaptive Card render error", | |||
"ATTACHMENT_AUDIO": "An audio clip.", | |||
"ATTACHMENT_CARD": "A card: $1 $2 $3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to specify attachment here? "A card attachment: $1 $2 $3"
corinagum
reviewed
Oct 20, 2020
packages/bundle/src/adaptiveCards/hooks/internal/useParseAdaptiveCardJSON.js
Outdated
Show resolved
Hide resolved
corinagum
reviewed
Oct 20, 2020
packages/bundle/src/adaptiveCards/createAdaptiveCardsAttachmentForScreenReaderMiddleware.js
Show resolved
Hide resolved
corinagum
reviewed
Oct 20, 2020
corinagum
reviewed
Oct 20, 2020
packages/component/src/Middleware/AttachmentForScreenReader/createCoreMiddleware.js
Show resolved
Hide resolved
corinagum
approved these changes
Oct 20, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, pending comments
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
Added new middleware for rendering attachment in screen reader.
Added default renderer for built-in attachment types, including Adaptive Cards, rich cards, and other media.
Design
Today, the screen reader narrate "Bot said: Hi I am Clara. 1 attachment."
Tomorrow, the screen reader will narrate "Bot said: Hi I am Clara. Card: I agree button. I don't agree button."
The DOM tree rendered in live region need to be simplified. Thus, we provide a new middleware for rendering attachments specific for live region.
Specific Changes
useCreateAttachmentForScreenReaderRenderer
hookScreenReaderActivity
to render using the new middlewareCHANGELOG.md
Review Checklist
Accessibility reviewed (tab order, content readability, alt text, color contrast)CSS styles reviewed (minimal rules, noz-index
)package.json
andpackage-lock.json
reviewedSecurity reviewed (no data URIs, check for nonce leak)