Fix songbook transpose readout width collapsing mobile controls bar (#5999) - #6083
Merged
Conversation
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
The Transpose live-region in
SongBookViewerrendered the full 21-character sentence (Transpose +1 semitones) visibly, expanding to ~176px inside amin-w-[3.5rem]box and forcing the mobile (375px) controls bar into 4–5 wrapped rows. The visible readout now renders only the numeric offset (0,+1,-2) while the words "Transpose"/"semitones" move intosr-onlychild spans, so the control fits inline and therole="status"element'stextContentstill readsTranspose 0 semitonesfor assistive tech and existing tests.One deviation from the issue's suggested snippet: the numeric span intentionally has no
aria-hidden— hiding it would drop the number from the accessible name underaria-atomic="true", so screen readers would announce only "Transpose semitones". Keeping it in the tree preserves the full announcement and the sametextContent.Test plan
cd client && npx vitest run src/pages/SongBookViewer.test.jsx— 66/66 pass, including the existing live-region assertions (textContent === 'Transpose 0 semitones'/'Transpose +1 semitones') and a new assertion that the visible non-sr-onlyspan renders the numeric offset (0).mtplx(low effort, 1 round): raised thearia-hiddenannouncement gap above; addressed, re-tested green.Closes #5999