Repository navigation
fix(gui): anchor sr-only text so the page cannot scroll past the player bar - #886
Conversation
…er bar (LargeModGames#878) The sr-only rule set position: absolute with no top or left, so the hidden screen-reader text next to each E badge and in the toast live regions kept its place in the list, was not clipped by the list scroll box, and the document grew to hold it - the whole page could scroll into empty space below the player bar. Anchoring the text to the viewport corner keeps it 1 px and clipped; screen readers still read it in DOM order.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
# Conflicts: # CHANGELOG.md
What does this PR do?
In the desktop app and the browser GUI the whole page could scroll down past the player bar into empty black space when the open list had explicit songs, and even without them a 1 px page scrollbar showed. The
.sr-onlyrule setposition: absolutewith notoporleft, so the hidden screen-reader text next to each E badge (and in the toast live regions) kept its place in the list instead of being anchored, the list's scroll box did not clip it, and the document grew to hold it. This addstop: 0; left: 0;to.sr-only: the text stays 1 px and clipped, nothing changes on screen, and screen readers still read it in DOM order. Nooverflow: hiddenon body or shell (that would hide the symptom), and the hidden text stays for screen readers.Related Issue
Fixes #878
Type of Change
Changes Made
gui/src/style.css:.sr-onlygainstop: 0; left: 0;gui/e2e/fixtures.ts: new derived fixturefilmScoresLongExplicit(40 tracks, explicit on every 7th row, unique ids/uris) - the shared filmScores fixture is untouchedgui/e2e/scenes.shot.ts: new scene that opens the long explicit playlist and assertsdocument.documentElement.scrollHeight === window.innerHeightCHANGELOG.md: entry under## [Unreleased] / FixedHow to Test
npm run build && npx playwright test --project=chromium -g "keeps the page from scrolling"ingui/Summary by CodeRabbit