Skip to content

[ticket/17644] Prevent hidden pagination labels from causing overflow#6991

Open
ECYaz wants to merge 1 commit into
phpbb:3.3.xfrom
ECYaz:ticket/17644
Open

[ticket/17644] Prevent hidden pagination labels from causing overflow#6991
ECYaz wants to merge 1 commit into
phpbb:3.3.xfrom
ECYaz:ticket/17644

Conversation

@ECYaz

@ECYaz ECYaz commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Checklist:

  • Correct branch: 3.3.x for fixes
  • Tests pass
  • Code follows coding guidelines
  • Commit follows commit message format

Tracker ticket:

https://tracker.phpbb.com/browse/PHPBB-17644

The horizontal scrollbar between 500px and 700px viewport width comes from the screen reader labels inside the pagination arrow buttons. The labels are visually hidden one pixel boxes, but .pagination li span also matches them and its padding inflates them to eleven pixels. Chrome includes such clipped boxes in the scrollable area, so with the pagination floated right the hidden label protrudes past the viewport and triggers the scrollbar.

Using a child combinator restricts the padding to the page number and ellipsis spans it was meant for. Measured in Chrome on both viewtopic and viewforum: four pixels of overflow at 600, 650 and 700 wide viewports before, zero overflow at every width from 320 to 700 after, with no change to any visible element, including mobile viewports. This fixes the root cause instead of moving the small screen pagination rule to a wider media query, which would have changed the layout between 500px and 700px.

The screen reader only labels inside the pagination arrow buttons
matched the .pagination li span selector, whose padding inflated the
visually hidden one pixel box to eleven pixels. As the pagination is
floated right between 500px and 700px viewport width, the padded box
protruded past the viewport and caused a horizontal scrollbar in
Chrome.

Use a child combinator so only the page number and ellipsis spans are
padded, leaving the screen reader labels at their intended size.

PHPBB-17644
@github-actions

Copy link
Copy Markdown

The attempt to merge branch 3.3.x into master has completed after considering the changes in this PR.

  • Merge result: Conflict ❌

A separate PR will be needed to merge 3.3.x into master.

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