Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Firefox) "Open Document Settings" region visible after closing sidebar #20759

Closed
mcsf opened this issue Mar 10, 2020 · 2 comments · Fixed by #21031
Closed

(Firefox) "Open Document Settings" region visible after closing sidebar #20759

mcsf opened this issue Mar 10, 2020 · 2 comments · Fixed by #21031
Assignees
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). General Interface Parts of the UI which don't fall neatly under other labels. [Status] In Progress Tracking issues with work in progress

Comments

@mcsf
Copy link
Contributor

mcsf commented Mar 10, 2020

Steps to reproduce

  1. Open the sidebar with either Document or Block settings selected.
  2. Close it using the X sign to the right from the Document and Block tabs.
    Observed: the little Open document settings region is visible.

Note that the same doesn’t happen when closing the sidebar by clicking on the cog icon

Screencast

firefox-toggle-sidebar

Environment

Firefox 74 (stable), macOS Catalina.

@mcsf mcsf added General Interface Parts of the UI which don't fall neatly under other labels. Browser Issues Issues or PRs that are related to browser specific problems [a11y] Keyboard & Focus labels Mar 10, 2020
@jorgefilipecosta
Copy link
Member

This problem is happening on WordPress 5.4 and was not happening on WordPress 5.3.

@aduth aduth self-assigned this Mar 18, 2020
@aduth
Copy link
Member

aduth commented Mar 19, 2020

Initial debugging:

  • Only happens in Firefox in macOS, not Windows
  • Most definitely in some way related to this behavior quirk of button clicking and focus
  • At the point that "X" is clicked, focus remains in the sidebar, which is why the "Open Document Settings" is still shown (source)
  • Yes, you heard right. Focus remains in the sidebar, despite the sidebar not being visible. The element still exists. I guess this is intentional (source)?
  • Normally we rely on this logic to forcibly move focus to the "Settings" button in the heading toolbar after clicking "X"

As a result, I sense it's something about the button not emitting events we're expecting, or at least in a way that withFocusReturn is not able to pick up on. In previous versions, I expect that the sidebar was not being rendered if closed, so focus would be "lost" by virtue of the fact that the element was removed from the DOM. Based on timing, I'd imagine this might be related to refactoring in #18044 (cc @youknowriad).

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Mar 19, 2020
@priethor priethor added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). General Interface Parts of the UI which don't fall neatly under other labels. [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants