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

Add NcIconSvgWrapper to public API #3630

Merged
merged 1 commit into from
Jan 7, 2023
Merged

Conversation

Pytal
Copy link
Contributor

@Pytal Pytal commented Jan 7, 2023

image

Unnecessary SVG title element addition is dropped as screenreaders will read the aria-label on span so we also reduce system resource usage

@Pytal Pytal added enhancement New feature or request 3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities labels Jan 7, 2023
@Pytal Pytal added this to the 7.4.0 milestone Jan 7, 2023
@Pytal Pytal requested review from artonge and skjnldsv January 7, 2023 02:45
@Pytal Pytal self-assigned this Jan 7, 2023
Copy link
Contributor

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Muuuch cleaner! Thank you Chris! 🚀

@skjnldsv
Copy link
Contributor

skjnldsv commented Jan 7, 2023

There are two followups while we're at it:

@raimund-schluessler
Copy link
Contributor

raimund-schluessler commented Jan 7, 2023

  • We recently found out that we could also use DOMPurify as a sanitizer. That would avoid myself maintaining @skjnldsv/sanitize-svg grin

DOMPurify.sanitize() works fine for SVGs too, I use it in an SVGViewer component (that will be replaced by this one here once it's out 😉). I already wondered why @skjnldsv/sanitize-svg exists 🙈

That would be nice 👍

@raimund-schluessler raimund-schluessler merged commit fa7b116 into master Jan 7, 2023
@raimund-schluessler raimund-schluessler deleted the enh/icon-svg-wrapper branch January 7, 2023 12:01
@skjnldsv
Copy link
Contributor

skjnldsv commented Jan 7, 2023

I already wondered why @skjnldsv/sanitize-svg exists

You and me both lol
We searched for a solution and forked the first one we found working.

This was referenced Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants