Distraction Free: raise top bar above notices when revealed by hover or keyboard focus - #80349
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |

What?
Closes #49485
Fixes an accessibility bug in Distraction free mode where admin/editor notices visually cover the top bar, while its buttons remain focusable and operable underneath, leaving keyboard users unable to see where focus currently is.
Why?
In Distraction free mode, the top bar (
Header) is faded out (opacity: 0) via a motion animation until it's hovered or contains focus. Admin notices are rendered in a sibling region that's deliberately kept visible (viaposition: absolute; z-index: 35) so they aren't hidden along with the top bar.The top bar's own
:focus-withinrule already restores itsopacitywhen a keyboard user tabs into one of its controls, but the top bar'sz-indexwas never raised to match, so it stayed underneath the notice'sz-index: 35. The practical effect: a sighted keyboard user tabbing through the interface lands on top bar controls that are fully operable but invisible, with no way to see where focus is. Tooltips for those controls then appeared to pop up out of nowhere, disconnected from any visible trigger.This was raised and discussed in the original Distraction free mode PR (#41740), but keyboard accessibility wasn't addressed at the time.
Testing Instructions
View > Distraction free).Testing Instructions for Keyboard
Tabrepeatedly to move focus toward the top bar controls (orShift+Tabback from the content into the top bar).Screenshots or screencast
Screen.Recording.2026-07-16.at.2.52.27.PM.mov