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

docs(a11y): revert #750 and add accessibility documentation for svgProps override #789

Merged
merged 2 commits into from
Oct 27, 2022

Conversation

pachuka
Copy link
Contributor

@pachuka pachuka commented Oct 26, 2022

Summary

Fixes #788

#737 #750 defaulted to adding role="img" and #787 added accessibilityRole="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 after npm install

http://localhost:8000/docs/options/#svg-props

image

@vercel
Copy link

vercel bot commented Oct 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
svgr ✅ Ready (Inspect) Visit Preview Oct 26, 2022 at 4:22AM (UTC)

@pachuka pachuka changed the title docs(a11y): revert #737 and add accessibility documentation for svgProps override docs(a11y): revert #750 and add accessibility documentation for svgProps override Oct 26, 2022
@gregberge
Copy link
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.

@mstllc
Copy link

mstllc commented Oct 26, 2022

much appreciated!

@gregberge gregberge merged commit e700943 into gregberge:main Oct 27, 2022
mrtnzlml added a commit to adeira/universe that referenced this pull request Nov 4, 2022
kodiakhq bot pushed a commit to adeira/universe that referenced this pull request Nov 4, 2022
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
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.

Default role="img" introduced in #737 #750 is a breaking change and should be reverted/have opt-out
3 participants