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

Include alt text as title/desc in injected SVG #688

Merged
merged 6 commits into from
Mar 12, 2024

Conversation

arthurattwell
Copy link
Member

@arthurattwell arthurattwell commented Mar 11, 2024

When we inject SVGs, the SVGInject module discards the image's alt text. This PR fixes that by ensuring that title and alt-text attributes in image tags are written into the inject SVG.

This PR also does a bit of related cleanup. If you're implementing this in another Electric-Book-template project, you probably only need the changes in 53f7885.

Copy link

netlify bot commented Mar 11, 2024

Deploy Preview for electric-book ready!

Name Link
🔨 Latest commit 53388e6
🔍 Latest deploy log https://app.netlify.com/sites/electric-book/deploys/65ef2c641eb9c900081fc197
😎 Deploy Preview https://deploy-preview-688--electric-book.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@arthurattwell arthurattwell merged commit cdbdab1 into master Mar 12, 2024
6 checks passed
@arthurattwell arthurattwell deleted the svg-inject-alt-text branch March 12, 2024 07:23
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.

None yet

2 participants