json-schema-org / json-schema-org/website
🐛 Bug: [Testing] Missing test coverage for Card component logic and accessibility
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 169
- Forks
- 484
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 6
Description
Describe the bug
The Card component is missing important safety tests.
Right now, if someone accidentally breaks the logic for links, HTML rendering, or accessibility, the current tests will still pass. This is a "testing gap" that makes the component less stable.
Steps To Reproduce
Open the existing Cypress test file for the Card component.
Observe that there are no tests for:
Cards without a link prop.
Cards using HTML tags in the body with the extended prop.
Image/Icon alt attribute verification.
Expected Behavior
The test suite should verify that:
- Link Logic: If link is undefined, the "Read More" text and Link wrapper do not render.
- HTML Support: If extended is true, HTML tags like are rendered as elements, not plain text.
- Accessibility: Icons and images always have an alt tag matching the title
Screenshots
No response
Device Information [optional]
- OS:
- Browser:
- version:
Are you working on this issue?
Yes
Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)
No
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
Open the existing Cypress test file for the Card component and run its current tests first. Add coverage for an undefined link, HTML elements when extended is true, and matching alt attributes on icons and images; done means these behaviors are verified without breaking the existing suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cypress
- Domain
- accessibility, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100