[ticket/17644] Prevent hidden pagination labels from causing overflow#6991
Open
ECYaz wants to merge 1 commit into
Open
[ticket/17644] Prevent hidden pagination labels from causing overflow#6991ECYaz wants to merge 1 commit into
ECYaz wants to merge 1 commit into
Conversation
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
|
The attempt to merge branch
A separate PR will be needed to merge |
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.
Checklist:
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 spanalso 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.