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

Updated addElementsToSVGElement plugin to support attribute values #817

Merged
merged 1 commit into from
Oct 25, 2017
Merged

Updated addElementsToSVGElement plugin to support attribute values #817

merged 1 commit into from
Oct 25, 2017

Conversation

keeganstreet
Copy link

Currently this plugin only supports attribute names. This PR adds the functionality for attribute values.

@keeganstreet
Copy link
Author

This also provides a solution for #780

@GreLI
Copy link
Member

GreLI commented Oct 25, 2017

Nice!

@GreLI GreLI merged commit eceb95c into svg:master Oct 25, 2017
@PhillyWebGuy
Copy link

How does one use this? Specifically, with webpack?

patrickhlauke added a commit to twbs/bootstrap that referenced this pull request Dec 12, 2018
…sable=false

- regarding `focusable=false`, see svg/svgo#1011 (which would be the "proper" SVGO fix) and the (hacky) solution svg/svgo#817
patrickhlauke added a commit to twbs/bootstrap that referenced this pull request Dec 13, 2018
…sable=false

- regarding `focusable=false`, see svg/svgo#1011 (which would be the "proper" SVGO fix) and the (hacky) solution svg/svgo#817
XhmikosR pushed a commit to twbs/bootstrap that referenced this pull request Dec 13, 2018
…sable=false

- regarding `focusable=false`, see svg/svgo#1011 (which would be the "proper" SVGO fix) and the (hacky) solution svg/svgo#817
patrickhlauke added a commit to twbs/bootstrap that referenced this pull request Dec 13, 2018
* SVG accessibility fixes

- add `focusable="false"` to all SVGs, to stop IE from including the `<svg>` in its default focus cycle
- completely hide decorative SVGs using `aria-hidden="true"`
- add `role="img"` to meaningful/"content" SVGs, ensure they have an appropriate `<title>` and/or `aria-label`
- simplify placeholder default title

* Simplify usage of placeholder.svg in the docs

- in most cases, no need for separate/redundant text and title (now that we make text itself part of the alternative text explicitly)
- no need (expect in rare cirumstances) to describe the placeholder image (unless the look of the image is important/the actual content, as is the case with the image thumbnail class)

* Simplify example.html rewriting of <svg> to <img> code sample

- as the `alt` for the placeholder isn't really important, just add an ellipsis instead (otherwise, to be correct, we'd have to construct the whole "title+text" construct like we do now in the
placeholder.svg itself

* Change svgo configuration to retain role attribute and add/force focusable=false

- regarding `focusable=false`, see svg/svgo#1011 (which would be the "proper" SVGO fix) and the (hacky) solution svg/svgo#817
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.

3 participants