WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 6 weeks ago

#53587 new defect (bug)

Mobile: Admin menu: Click on content should hide the menu

Reported by: kaneva Owned by:
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: ui, accessibility, javascript, administration Cc:

Description

Steps to reproduce:

  1. Use a mobile device
  2. Go to the admin via the browser
  3. Expand the admin menu
  4. Click on the content on the right side
  5. Observe admin menu does not hide

I expect the menu to hide when I click on the content. Additionally, I expect the content on the right half to be non interactive.

Attachments (3)

Screenshot_2021-07-05-13-47-54-613_com.android.chrome.jpg (355.1 KB) - added by kaneva 3 months ago.
The menu in question
expanded-admin-menu-firefox-200-zoom.png (39.5 KB) - added by sabernhardt 2 months ago.
focused element with menu expanded, at 200% zoom
#53587 - Close sidebar on focusout.gif (2.1 MB) - added by costdev 6 weeks ago.
#53587 - After patch

Change History (8)

#1 follow-up: @sabernhardt
3 months ago

  • Focuses ui accessibility javascript added

Hi @kaneva and thanks for the report!

We should also consider closing the admin menu on focus state within the content area (when using the Tab key with desktop browser zoom of 200% or more).

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


2 months ago

@sabernhardt
2 months ago

focused element with menu expanded, at 200% zoom

#3 @joedolson
2 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.9

This ticket was mentioned in PR #1584 on WordPress/wordpress-develop by costdev.


6 weeks ago

  • Keywords has-patch added; needs-patch removed

Added a focusout event listener to #wp-admin-bar-menu-toggle and #adminmenumain.

Provided that $wpwrap.hasClass( 'wp-responsive-open' ), and neither of the above parents or their children contain the newly focused element, the sidebar will close.

N.B. While the sidebar is open, non-sidebar content doesn't respond to the first input attempt, negating any impact of accidental click or touch events.

Trac ticket: https://core.trac.wordpress.org/ticket/53587

#5 in reply to: ↑ 1 @costdev
6 weeks ago

Replying to sabernhardt:

Hi @kaneva and thanks for the report!

We should also consider closing the admin menu on focus state within the content area (when using the Tab key with desktop browser zoom of 200% or more).

The submitted patch also closes the menu in this circumstance.

Note: See TracTickets for help on using tickets.