processing / processing/p5.js-website
Change content schemas to require alt text with an image
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 96
- Forks
- 322
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 8
Description
In our content schemas, it is possible to provide an featured image but no alt text for it. Our schemas hold them separately as in:
featuredImage: image().optional(),
featuredImageAlt: z.string().optional(),
a schema like this would prevent authors from adding an image without also including alt text:
featuredImage: z.object({
src: image(),
alt: z.string()
}).optional(),
which also makes it possible to provide a default with accurate alt text, as in:
featuredImage: z.object({
src: image(),
alt: z.string()
}).optional().default({
src: PlaceholderImage
alt: 'the p5 logo in a grey box'
}),
Contributor guide
No contributing guide indexed for this repository
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 by locating the content schema definitions described in the issue and inspect how featuredImage and featuredImageAlt are consumed. Update the schema so an image always has accompanying alt text, including any default featured image, then verify that existing content validates and images without alt text are rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- accessibility, content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100