docs(a11y): revert #750 and add accessibility documentation for svgProps override#789
Merged
gregberge merged 2 commits intogregberge:mainfrom Oct 27, 2022
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
svgProps overridesvgProps override
Owner
|
Since SVGR is mostly used for icons which do not requires a role "img" in most cases it makes sense to me. I should not have accept the PR at first, thanks for making me aware of this. |
|
much appreciated! |
mrtnzlml
added a commit
to adeira/universe
that referenced
this pull request
Nov 4, 2022
See: gregberge/svgr#789 for more details
kodiakhq Bot
pushed a commit
to adeira/universe
that referenced
this pull request
Nov 4, 2022
See: gregberge/svgr#789 for more details
adeira-github-bot
pushed a commit
to adeira/icons
that referenced
this pull request
Nov 4, 2022
See: gregberge/svgr#789 for more details adeira-source-id: 1cfca3036c75cf94f0781c6f98299d8b72617b14
This file contains hidden or 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
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.
Summary
Fixes #788
#737 #750 defaulted to adding
role="img"and #787 addedaccessibilityRole="image"for react-native on SVG Nodes.The way this was added made it a breaking change for current consumers of svgr > 6.3.
Instead recommend adding documentation to the
svgPropsoption that can be passed into any SVGR configuration with how to add these defaults and reverted those changes.The reasoning behind that is most consumers most-likely already handle accessibility within their applications and SVGR can just provide some guidance instead.
Test plan
npm run devfrom the/websitedirectory afternpm installhttp://localhost:8000/docs/options/#svg-props