OG rendering SVG title element
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/cool-darkness-679p3h
To Reproduce
- Start the application in development or production mode
- Navigate to
/opengraph-image
Current vs. Expected behavior
Expect only the SVG to render, not the title element that is there for a11y.
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023
Available memory (MB): 4102
Available CPU cores: 2
Binaries:
Node: 20.12.1
npm: 10.5.0
Yarn: 1.22.19
pnpm: 8.15.6
Relevant Packages:
next: 16.1.1-canary.12 // Latest available version is detected (16.1.1-canary.12).
eslint-config-next: N/A
react: 19.2.3
react-dom: 19.2.3
typescript: 5.9.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed), next start (local), next dev (local)
Additional context
We enabled biome checking and fixed reported a11y issues with SVGs missing title by adding the title element to the SVGs. We now see title is rendered in OG.
We have this in production over at www.gredice.com/opengraph-image We applied opacity workaround. Version doesn't seem to be an issue, it was present in 15 too.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproduction and inspect the /opengraph-image route and its SVG output. Reproduce the issue in development or production mode, then verify that the generated OG image renders only the SVG while the accessibility-related title element no longer appears visibly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, react
- Domain
- accessibility, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100