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

bug: <title> tag still exists in svg icon (ionicons 6.1.0) #1168

Closed
jonz94 opened this issue Jan 17, 2023 · 4 comments · Fixed by #1169
Closed

bug: <title> tag still exists in svg icon (ionicons 6.1.0) #1168

jonz94 opened this issue Jan 17, 2023 · 4 comments · Fixed by #1169
Labels
type: bug A bug in the functionality of Ionicons

Comments

@jonz94
Copy link
Contributor

jonz94 commented Jan 17, 2023

Current Behavior

It seems like ionicons version 6.1.0 published on npm still have <title> tag inside the svg icon.

Screenshots from https://www.npmjs.com/package/ionicons?activeTab=explore

Screenshot 2023-01-18 at 04 16 46

So issues described in #838 are not completely resolved.

Expected Behavior

The svg icon published on npm should not have any <title> tag by default.

Steps to Reproduce

  1. Create an Ionic Project via ionic cli
  2. Update ionicons to 6.1.0
  3. Add <ion-icon name="accessibility-outline"></ion-icon> on the page
  4. npm start
  5. Move mouse cursor on the icon, the Accessibility tooltip will show up

Screenshot 2023-01-18 at 04 46 04

Code Reproduction URL

https://github.com/jonz94/ionicons-issue-1168

Additional Information

Based on information provided #838 (comment)

Change following lines:

ionicons/scripts/build.ts

Lines 169 to 172 in 8c2a507

const optimizedCode = optimizedSvg.data.replace(
/<svg (.*?)>/,
`<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><title>${svgData.title}</title>`,
);

into:

const optimizedCode = optimizedSvg.data.replace(
  /<svg (.*?)>/, 
  `<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512">`, 
); 

should be able to resolve the issue.

@DercilioFontes
Copy link

I'm facing the same issue yet in v6.1.0.

@liamdebeasi
Copy link
Contributor

Thanks for letting us know. I will merge #1169 once CI passes and then will publish a new release.

@liamdebeasi liamdebeasi added the type: bug A bug in the functionality of Ionicons label Jan 18, 2023
@ionitron-bot ionitron-bot bot removed the triage New issues label Jan 18, 2023
@liamdebeasi
Copy link
Contributor

This has been resolved via #1169. I will post an update here when the fix has been released.

@liamdebeasi
Copy link
Contributor

A fix for this issue has been releases in Ionic 6.1.1. Thanks again for the report and the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A bug in the functionality of Ionicons
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants