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

feat(babel-preset): add attribute role="img" to the svg element #750

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

sinchang
Copy link
Contributor

Summary

Closes #737

Test plan

@vercel
Copy link

vercel bot commented Jul 24, 2022

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

Name Status Preview Updated
svgr ✅ Ready (Inspect) Visit Preview Jul 24, 2022 at 7:44AM (UTC)

@codecov
Copy link

codecov bot commented Jul 24, 2022

Codecov Report

Merging #750 (f335e8b) into main (1dbc3e2) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #750   +/-   ##
=======================================
  Coverage   92.26%   92.26%           
=======================================
  Files          32       32           
  Lines         802      802           
  Branches      262      262           
=======================================
  Hits          740      740           
  Misses         59       59           
  Partials        3        3           
Impacted Files Coverage Δ
packages/babel-preset/src/index.ts 95.74% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

@gregberge gregberge merged commit 8b9edc4 into gregberge:main Sep 28, 2022
@gregberge
Copy link
Owner

Thanks @sinchang

@sinchang sinchang deleted the feature/add-attribute-role branch September 28, 2022 08:26
@jupavavi
Copy link

jupavavi commented Oct 4, 2022

I realized this PR doesn't play well with react-native-svg while using typescript as the role attr is not supported by SvgProps type.

@faroutchris
Copy link

faroutchris commented Oct 7, 2022

I have the same issue as @jupavavi @gregberge.
Expected behaviour should be just like the title prop
/* SVGR has dropped some elements not supported by react-native-svg: title */

@jupavavi
Copy link

jupavavi commented Oct 7, 2022

Shall we report this issue?

@slavikdenis
Copy link
Contributor

Fixing it via #787

gregberge pushed a commit that referenced this pull request Oct 27, 2022
gregberge added a commit that referenced this pull request Oct 27, 2022
docs(a11y): revert #750 and add accessibility documentation for `svgProps` override
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.

put role="img", if missing, to produced svg element
5 participants