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

Support for aria-labels on link #3022

Merged
merged 4 commits into from
Mar 17, 2020
Merged

Conversation

patniko
Copy link
Contributor

@patniko patniko commented Mar 17, 2020

Changelog Entry

Added support for custom attributes in the markdown renderer.

Description

Modern screen readers require aria-label attributes to be present on links, but the current markdown-it configuration doesn't support aria-label attributes. Adding support for attributes will enable users to set aria-label's and custom attributes on links in the Bot configuration interface.

Appending {aria-label="Label description"} to the end of the link sets the aria-label attribute on the link when rendered.

Specific Changes

Imported the markdown-it-attrs npm package and added it to the renderer's configuration.

--

  • Testing Added

@patniko patniko changed the title Support for aria-labels on link using [link](url){aria-label="Screen … Support for aria-labels on link Mar 17, 2020
@compulim compulim merged commit 31291d5 into microsoft:master Mar 17, 2020
@compulim
Copy link
Contributor

compulim commented Mar 17, 2020

image

I am testing 4.8.1-master.31291d5.

@compulim
Copy link
Contributor

The markdown-it-attrs package doesn't support ES5 and will break IE11 simply by loading it.

Although it do include ES5 version, it didn't expose it properly (via package.json/browser field).

I am fixing it by transpiling it before consuming/loading it. Will need to take another PR before we can produce a working build.

@compulim
Copy link
Contributor

#3025 will fix this.

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.

2 participants