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
SVG <title>
tag is either removed, or used as page title
#42226
Comments
Thanks! This is related to the way React finds title and injects it into the head. @gnoff will have a look. |
This is a blocking issue for a project migration, is there any estimate on when this will be resolved? Thanks very much. |
will be fixed after: #42639 |
This issue is now resolved. |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
What browser are you using? (if relevant)
Version 106.0.5249.119
How are you deploying your application? (if relevant)
No response
Describe the Bug
The
<title>
tag inside an inlined SVG is either removed from the markup (hindering accessibility) OR* it is actually become the meta page title of the document (the title you see in your browser tab that is defined inapp/head.tsx
).I noticed this behaviour on my own site. I have an inline SVG in the footer of the root layout. When I run the dev server or build the site, the
<title>
of the page was the<title>
of this SVG file. Only when I removed the title was it replaced with the title defined inapp/head.tsx
.I tried to make a minimal reproduction of this issue in StackBlitz. While I couldn’t get 100% there (the built page shows the correct title), you can still observe the behaviour if you change the
<title>
of the SVG and save the file. Furthermore, when the SVG is inspected in dev tools, the<title>
attribute is not there.Here is a video reproduction using Safari, but I was otherwise using Chrome for everything else
Kapture.2022-10-31.at.12.07.00.mp4
Expected Behavior
<title>
attribute of the SVG is not removed<title>
of the document is only taken fromhead.tsx
Link to reproduction
https://stackblitz.com/edit/vercel-next-js-cugnsk?file=components%2FInlineSVG.tsx
To Reproduce
<title>
elementThe text was updated successfully, but these errors were encountered: