Skip to content

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

Merged
gregberge merged 1 commit into
gregberge:mainfrom
XChangLab:feature/add-attribute-role
Sep 28, 2022
Merged

feat(babel-preset): add attribute role="img" to the svg element#750
gregberge merged 1 commit into
gregberge:mainfrom
XChangLab:feature/add-attribute-role

Conversation

@sinchang

Copy link
Copy Markdown
Contributor

Summary

Closes #737

Test plan

@vercel

vercel Bot commented Jul 24, 2022

Copy link
Copy Markdown

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

codecov Bot commented Jul 24, 2022

Copy link
Copy Markdown

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
Copy Markdown
Owner

Thanks @sinchang

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

jupavavi commented Oct 4, 2022

Copy link
Copy Markdown

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.

@che-122

che-122 commented Oct 7, 2022

Copy link
Copy Markdown

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

jupavavi commented Oct 7, 2022

Copy link
Copy Markdown

Shall we report this issue?

@slavikdenis

Copy link
Copy Markdown
Contributor

Fixing it via #787

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