Skip to content

fix(z-book-card): move CTA slot after metadata to fix reading order (WCAG 1.3.2)#654

Open
ada-workbackai wants to merge 1 commit intomasterfrom
workbackai/fix/wcag-1.3.2-z-book-card-reading-order
Open

fix(z-book-card): move CTA slot after metadata to fix reading order (WCAG 1.3.2)#654
ada-workbackai wants to merge 1 commit intomasterfrom
workbackai/fix/wcag-1.3.2-z-book-card-reading-order

Conversation

@ada-workbackai
Copy link
Copy Markdown
Contributor

Summary

Fixes a WCAG 1.3.2 (Meaningful Sequence) violation in z-book-card.

Problem: The cta slot (e.g. favourite/bookmark button) was rendered inside the authors row wrapper (landscape variant) or the title row wrapper (portrait variant), placing it between bibliographic metadata in the DOM. Screen readers encountered: Author → Favourite Button → Title → Volume → ISBN — an interrupted sequence that impairs comprehension and may cause users to activate the wrong action.

Fix:

  • Removed the cta slot from renderAuthors() and renderOperaTitle()
  • Added a dedicated cta-slot wrapper div rendered after all metadata in card-info
  • Absolutely positioned cta-slot at top: 0; right: 0 of card-info (which gains position: relative) to preserve the existing top-right visual placement

DOM order after fix: Year → Authors → Title → Volume → ISBN → CTA slot → ebook slot

Visual appearance: Unchanged — the CTA button remains visually at the top-right corner of the card info area via position: absolute.

Test plan

  • Lint passes (yarn lint)
  • Build passes (yarn build)
  • Verify CTA slot visually appears in top-right corner of card info (landscape and portrait variants)
  • Verify screen reader reading order: Year → Authors → Title → Volume → ISBN → CTA content

Screen readers encounter the favorite button between the author name and
book title, breaking the logical sequence. Moved the CTA slot to after
all book metadata (year, authors, title, volume, ISBN) in the DOM and
used absolute positioning to preserve its top-right visual placement.

Fixes WCAG 1.3.2 (Meaningful Sequence).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant