docs(a11y): revert #750 and add accessibility documentation for svgProps
override
#789
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
svgProps
option 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 dev
from the/website
directory afternpm install
http://localhost:8000/docs/options/#svg-props