lighthouse fixes

This commit is contained in:
2026-02-10 22:37:29 -05:00
parent 26a8c97841
commit 07d8787972
785 changed files with 166486 additions and 77 deletions

View File

@@ -14,6 +14,12 @@ The modal MUST render the following elements in order:
- The publish date and view count (when available)
- A "Subscribe on YouTube" / "Follow on Spotify" CTA and a "View on YouTube" / "Listen on Spotify" CTA
All modal CTAs that represent navigation MUST be implemented as crawlable anchors:
- Each CTA MUST be an `<a>` element with a non-empty `href` attribute.
- The UI MUST NOT render placeholder `<a>` elements without `href` in the initial HTML.
- If CTA destinations are not known until a user selects an item, the CTA UI MUST be rendered as non-anchor elements until the destinations are known.
#### Scenario: User clicks a YouTube video card
- **WHEN** a user clicks a video content card on any listing surface
- **THEN** a modal dialog opens displaying a YouTube iframe embed, the video title, full description, date, view count (if available), and CTAs for "Subscribe on YouTube" and "View on YouTube"
@@ -32,6 +38,17 @@ The modal MUST render the following elements in order:
- **WHEN** a content item has no view count or no summary
- **THEN** the modal MUST still render cleanly with those fields omitted
#### Scenario: Modal CTAs are crawlable anchors
- **WHEN** the modal is present in the DOM (before any user interaction)
- **THEN** the document contains no `<a>` elements in the modal that are missing `href`
### Requirement: Embed fallback is a link only when a destination is available
If an embed fallback is presented as a link to an external page, it MUST be an anchor with a valid `href`. If no destination is available, the fallback MUST be hidden or rendered as non-link text.
#### Scenario: Embed fallback does not render a non-crawlable anchor
- **WHEN** the modal is rendered before any item selection
- **THEN** the embed fallback is not rendered as an anchor without `href`
### Requirement: Playback stops on modal close
The modal MUST stop all media playback when it is dismissed, regardless of the dismissal method.