json-schema-org / json-schema-org/website

🐛 Bug: [Testing] Missing test coverage for Card component logic and accessibility

Open
#2,137 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🐛 Bug Status: Stale Status: Triage
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:

  1. Link Logic: If link is undefined, the "Read More" text and Link wrapper do not render.
  2. HTML Support: If extended is true, HTML tags like are rendered as elements, not plain text.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.