visually-hidden text in table shows body scrollbar in Chrome
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 175k
- Forks
- 78.6k
- Avg merge
- 7h 19m
- Merged PRs (30d)
- 35
Description
Prerequisites
- I have searched for duplicate or closed issues
- I have validated any HTML to avoid common problems
- I have read the contributing guidelines
Describe the issue
I have a horizontally scrolled, wide table that contains visually-hidden text in the table head. This produces an unexpected body scrollbar in Chrome. Observation:
- Does not occur in Firefox.
- Does not occur when there is no visually-hidden text.
- Does only occur when the visually-hidden text is in the last columns that exceed the scrolled wrapper width.
- Does not occur when "position: fixed" is used for visually-hidden (but I guess this is not an option for a fix).
I don't know a workaround so far that doesn't have downsides for a11y.
Maybe this is a bug in Chrome itself.
Reduced test cases
See this reproducing example. Open in Chrome and reduce the window width (e.g. by dev tools) until a scroll bar appears for the body (ignore the table wrapper scrollbar, this is intended). Scrolling the body, you can see that the table wrapper does not exceed the expected width.
https://codepen.io/s4R8/full/myJGwrY
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
5.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodePen reproduction in Chrome at a narrow window, then inspect the table wrapper and visually-hidden text in the Bootstrap 5.3 context. Compare the behavior with Firefox and with the visually-hidden text removed or positioned fixed. Done means the accessible hidden text remains while the body scrollbar is not unexpectedly introduced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, html
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100