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
Open
fix(z-book-card): move CTA slot after metadata to fix reading order (WCAG 1.3.2)#654ada-workbackai wants to merge 1 commit intomasterfrom
ada-workbackai wants to merge 1 commit intomasterfrom
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a WCAG 1.3.2 (Meaningful Sequence) violation in
z-book-card.Problem: The
ctaslot (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:
ctaslot fromrenderAuthors()andrenderOperaTitle()cta-slotwrapper div rendered after all metadata incard-infocta-slotattop: 0; right: 0ofcard-info(which gainsposition: relative) to preserve the existing top-right visual placementDOM 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
yarn lint)yarn build)