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

A better SVG Image #7907

Closed
1 task
mgifford opened this issue Aug 1, 2023 · 2 comments · Fixed by #7926
Closed
1 task

A better SVG Image #7907

mgifford opened this issue Aug 1, 2023 · 2 comments · Fixed by #7926
Labels
- P1: chore Doesn't change code behavior (priority) help wanted Please help with this issue! pkg: example Related to an example package (scope)

Comments

@mgifford
Copy link
Contributor

mgifford commented Aug 1, 2023

What version of astro are you using?

v2.9.7

Are you using an SSR adapter? If so, which one?

No idea

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Edge

Describe the Bug

On the start page http://localhost:3000/

The SVG image for the logo could be improved:
https://codepen.io/mgifford-the-typescripter/pen/ExOGJeE

Really, it should be more visible than it is, but this would be a better semantic SVG file.

SVG files like this should have a tilte & description as they have a meaning visually.

What's the expected result?

I posted it above, for other examples, see https://codepen.io/cariefisher/pen/QWpjded

Link to Minimal Reproducible Example

https://codepen.io/mgifford-the-typescripter/pen/ExOGJeE

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Aug 1, 2023
@natemoo-re natemoo-re added help wanted Please help with this issue! pkg: example Related to an example package (scope) - P1: chore Doesn't change code behavior (priority) labels Aug 1, 2023
@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Aug 1, 2023
@natemoo-re
Copy link
Member

If you'd like to open a PR to update the example, please feel free! The SVG is inlined because we don't want to include an additional file for users to delete when they start writing their project.

I would say that this SVG is entirely decorative, so a semantic title and description would be less ideal than simply including alt="" and role="presentation".

@mgifford
Copy link
Contributor Author

mgifford commented Aug 2, 2023

Ya, that would work too. Would make it easier to be multi-lingual. Created this little PR:

#7926 

You can't add alt="" to a SVG.

Reference:
https://www.scottohara.me/blog/2019/05/22/contextual-images-svgs-and-a11y.html#svgs-that-are-decorative

@natemoo-re natemoo-re linked a pull request Aug 2, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P1: chore Doesn't change code behavior (priority) help wanted Please help with this issue! pkg: example Related to an example package (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants