Skip to content

fix(gui): anchor sr-only text so the page cannot scroll past the player bar - #886

Merged
LargeModGames merged 2 commits into
LargeModGames:mainfrom
niukanen1:fix/sr-only-page-scroll-878
Oct 17, 2026
Merged

LargeModGames merged 2 commits into
LargeModGames:mainfrom
niukanen1:fix/sr-only-page-scroll-878

Conversation

@niukanen1

@niukanen1 niukanen1 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

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-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 instead of being anchored, the list's scroll box did not clip it, and the document grew to hold it. This adds top: 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. No overflow: hidden on body or shell (that would hide the symptom), and the hidden text stays for screen readers.

Related Issue

Fixes #878

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • gui/src/style.css: .sr-only gains top: 0; left: 0;
  • gui/e2e/fixtures.ts: new derived fixture filmScoresLongExplicit (40 tracks, explicit on every 7th row, unique ids/uris) - the shared filmScores fixture is untouched
  • gui/e2e/scenes.shot.ts: new scene that opens the long explicit playlist and asserts document.documentElement.scrollHeight === window.innerHeight
  • CHANGELOG.md: entry under ## [Unreleased] / Fixed

How to Test

  1. npm run build && npx playwright test --project=chromium -g "keeps the page from scrolling" in gui/
  2. Without the CSS change the scene fails with scrollHeight 2669 vs innerHeight 900; with it the page height equals the window. The full chromium suite passes (52 scenes), and lint, format:check, typecheck and npm test are clean

Summary by CodeRabbit

  • Bug Fixes
    • Fixed unwanted page scrolling in the desktop app and browser interface when playlists contain explicit tracks. Visually hidden screen-reader text no longer extends the page below the player bar, keeping the document within the window. Playlist panels remain scrollable, so long playlists can still be browsed without causing the entire page to scroll.

…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.
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: LargeModGames/spotatui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c1132247-f1f2-422c-90a7-7cf377828898
📥 Commits

Reviewing files that changed from the base of the PR and between a54f044 and df978f3.

📒 Files selected for processing: 1
  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The .sr-only rule now positions hidden text at the viewport origin. A new end-to-end test uses a long playlist with explicit tracks and checks that the document height matches the window height.

Changes: Page scroll fix

Layer / File(s) Summary
Position screen-reader-only text
gui/src/style.css, CHANGELOG.md
The .sr-only rule adds top: 0 and left: 0. The changelog records the explicit-track scrolling fix.
Check long-playlist page height
gui/e2e/fixtures.ts, gui/e2e/scenes.shot.ts
A 40-track fixture includes explicit tracks. A new Playwright test waits for “Long cut 32” and checks that document height equals window height.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to df978

The change preserves the screen-reader labels while addressing page-height growth, and the added scene checks the page height with an explicit-track playlist. No actionable merge-blocking risk is evident; proceed with normal checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the allowed fix(gui): conventional-commit prefix and clearly describes the main CSS fix for preventing page scrolling past the player bar. The subject is concise and imperative.
Linked Issues check Passed Issue #878 is an active direct link. gui/src/style.css anchors .sr-only with top: 0 and left: 0. The new Playwright scene uses a 40-track playlist with explicit tracks and asserts `document.do…
Out of Scope Changes check Passed The changes stay within issue #878. The CSS change addresses the reported cause. The derived fixture and Playwright scene provide the required regression test. The changelog entry documents the fix. N…
Full details: Linked Issues check

Explanation

Issue #878 is an active direct link. gui/src/style.css anchors .sr-only with top: 0 and left: 0. The new Playwright scene uses a 40-track playlist with explicit tracks and asserts document.documentElement.scrollHeight === window.innerHeight. The supplied evidence reports that the scene fails without the CSS change and passes with it. The evidence also reports passing npm run lint, npm run format:check, npm run typecheck, and npm test in gui/. The change retains screen-reader text and does not add body or shell overflow hiding.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #878. The CSS change addresses the reported cause. The derived fixture and Playwright scene provide the required regression test. The changelog entry documents the fix. No unrelated product behavior or unrelated files are identified.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
✨ Simplify code
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@LargeModGames
LargeModGames merged commit 52b0727 into LargeModGames:main Oct 17, 2026
32 checks passed
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.

GUI: the page scrolls past the player bar when a list has explicit songs

2 participants