-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Remove markdown from spoken text for screen reader #2096
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
requested review from
a-b-r-o-w-n,
compulim,
cwhitten,
justinwilaby and
tonyanziano
as code owners
June 19, 2019 19:52
* Fixed markdown renderer in Playground * Updated CHANGELOG.md * Fixed markdown renderer in Playground * Updated CHANGELOG.md * Modified renderMarkdown function
compulim
approved these changes
Jun 19, 2019
- Web Chat does not support IE<11 | ||
- Customization as shown in non-es5 samples are not supported for Internet Explorer. Because IE11 is a non-modern browser, it does not support ES6, and many samples that use arrow functions and modern promises would need to be manually converted to ES5. If you are in need of heavy customization for your app, we strongly recommend developing your app for a modern browser like Google Chrome or Edge. | ||
- Web Chat is unable to support the conversion of our samples to pre-2015 compatibility, and does not plan on supporting customization samples for IE11 (ES5). | ||
- For customers who wish to manually rewrite our other samples to work in IE11, we recommend looking into converting code from ES6+ to ES5 using polyfills and transpilers like [`babel`](https://babeljs.io/docs/en/next/babel-standalone.html). |
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.
Suggested change
- For customers who wish to manually rewrite our other samples to work in IE11, we recommend looking into converting code from ES6+ to ES5 using polyfills and transpilers like [`babel`](https://babeljs.io/docs/en/next/babel-standalone.html). | |
- If you wish to try out our samples in IE11, we would recommend transpiling our source code on-the-fly using [`babel-standalone`](https://babeljs.io/docs/en/next/babel-standalone.html). Please note that transpiling on-the-fly is not recommended for production use. |
const fromUser = role === 'user'; | ||
const showSendStatus = state === SENDING || state === SEND_FAILED; | ||
const ariaLabel = localize(fromUser ? 'User said something' : 'Bot said something', language, avatarInitials, text); | ||
const activityDisplayText = messageBackDisplayText || text; | ||
const strippedText = remark() |
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.
Call it plainText
or strippedMarkdown
.
Co-Authored-By: William Wong <compulim@users.noreply.github.com>
12 tasks
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.
Fixes #2001
Changelog Entry
Description
remark
andstrip-markdown
takes the original (formatted) text and removes the markdown, creating an improved a11y experience.