Skip to content
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 17 commits into from
Jun 19, 2019

Conversation

corinagum
Copy link
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

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
- 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
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.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
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()
Copy link
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.

samples/01.b.getting-started-es5-bundle/README.md Outdated Show resolved Hide resolved
@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