-
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
Bump deps and remove remark
and strip-markdown
#3917
Merged
Merged
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
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
corinagum
reviewed
Jun 2, 2021
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.
Pending some comments. 'Outdated' status doesn't necessarily mean the comment is obsolete; could you look through them too?
Ready for next pass. |
corinagum
approved these changes
Jun 3, 2021
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.
LGTM!
compulim
added a commit
that referenced
this pull request
Jun 22, 2021
* Bump deps * Go back to v1 * Remove remark and strip-markdown * Revert to v1 * Revert to v1 * Revert to v1 * Supports summary field * Ignore summary field * Strip Markdown from HTML * Add speak field not present * Update strip Markdown * Narrate empty text field * Use different text computation for HTML/Markdown * Clean up * Update with samples * More inline elements * Clean up * MessageBack must not be Markdown * Lockdown performance * Add snapshots * Fix MessageBack * Remove renderMarkdownAsHTML * Fix ESLint * Assume plain text if renderMarkdown is null * Compute text alternatives using alt field * Change to webchat:fallback-text field * Bump to [email protected] * Typo * Update entry * Typo * Update entry * Link to issue * Undo package*.json for core/embed * Move allTextContents into testHelpers * Add @param * Apply PR suggestions * Update text
This was referenced Jun 23, 2021
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
channelData['webchat:fallback-text']
field for screen reader text, before stripping Markdown fromactivity.text
field, by @compulim, in PR #3917Changed
[email protected]
[email protected]
Description
Bump dependencies with
npm audit
, and a few more:[email protected]
[email protected]
We removed
remark
andstrip-markdown
. They are used to extract screen reader text from activity:activity.text
field usingremark
andstrip-markdown
packagesactivity.channelData['webchat:fallback-text']
field is available, we will use it as-isactivity.text
field with best efforttext
usinguseRenderMarkdown
hook into HTML stringnew DOMParser().parseFromString()
to parse HTML string asHTMLDocument
HTMLDocument
and concatenates all text nodesPlease refer to
ACCESSIBILITY.md
for details.Design
Considerations on removing
remark
Previously, we use
remark
to implement the "extract screen reader text from Markdown" feature. But the feature itself is causing a few issues: #3360 and #3615.Although
remark@10
has vulnerability in their dependencies and they fixed it inremark@12
, they no longer support IE11.We have a newer logic for stripping Markdown syntax. It will work with HTML tags with best effort. However, bot developers are strongly recommended to provide
speak
field for precise narration. SeeACCESSIBILITY.md
for details.Specific Changes
npm audit
and more:[email protected]
[email protected]
remark
andstrip-markdown
to extract screen reader text fromtext
fieldchannelData['webchat:fallback-text']
field, fallback to remove Markdown syntax fromtext
field with best effortnew DOMParser().parseFromString()
and walk theHTMLDocument
manuallyCHANGELOG.md
Review Checklist
CSS styles reviewed (minimal rules, noz-index
)Internationalization reviewed (strings, unit formatting)package.json
andpackage-lock.json
reviewedSecurity reviewed (no data URIs, check for nonce leak)