Skip to content

Remove markdown from spoken text for screen reader#2096

Merged
corinagum merged 17 commits intomicrosoft:masterfrom
corinagum:fix-2001
Jun 19, 2019
Merged

Remove markdown from spoken text for screen reader#2096
corinagum merged 17 commits intomicrosoft:masterfrom
corinagum:fix-2001

Conversation

@corinagum
Copy link
Copy Markdown
Contributor

@corinagum corinagum commented Jun 19, 2019

Fixes #2001

Changelog Entry

  • Fix #2001. Strip markdown from aria labels, so screenreaders do not speak markdown in text, by @corinagum in PR #2096

Description

  • Previously, screenreaders would read markdown symbols from formatted text. Using remark and strip-markdown takes the original (formatted) text and removes the markdown, creating an improved a11y experience.
  • deleted backend-cli sample

Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
- 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).
Copy link
Copy Markdown
Contributor

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.

Comment thread README.md Outdated
Comment thread README.md Outdated
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()
Copy link
Copy Markdown
Contributor

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.

Comment thread samples/01.b.getting-started-es5-bundle/README.md Outdated
@corinagum corinagum merged commit 4ddc182 into microsoft:master Jun 19, 2019
@compulim compulim mentioned this pull request Jul 8, 2019
26 tasks
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.

Accessibility: Narrator reads markdown that is passed through the localize method

3 participants