Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#46307 assigned defect (bug)

Custom admin menu items don't provide their title on medium breakpoint

Reported by: garrett-eclipse's profile garrett-eclipse Owned by: garrett-eclipse's profile garrett-eclipse
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Administration Keywords: needs-patch
Focuses: ui, accessibility Cc:

Description

With custom admin menus if no submenu is provided for them they don't have a flyout on hover which on medium breakpoint leaves them only identified by their icon.

Note: Core menus all have submenus so this only affects custom menus developers introduce.

It would be nice to still provide the submenu flyout with only the wp-submenu-head item present as that would provide the title of the item.

The submenu items are introduced here with the first item being the wp-submenu-head. Am thinking moving the empty check into the ul would leave the flyout providing the title.
https://github.com/WordPress/WordPress/blob/92aa2f9e92a4e1ad5471d87d5292587c5cee5702/wp-admin/menu-header.php#L178-L250

Attachments (2)

Screen Shot 2019-02-21 at 10.48.05 PM.png (20.2 KB) - added by garrett-eclipse 5 years ago.
Current Behaviour - No title shown only icon for menus w/o submenus
Screen Shot 2019-02-21 at 10.51.45 PM.png (16.8 KB) - added by garrett-eclipse 5 years ago.
Suggested Behaviour - Title shown on hover to indicate what the menu item is for

Download all attachments as: .zip

Change History (5)

@garrett-eclipse
5 years ago

Current Behaviour - No title shown only icon for menus w/o submenus

@garrett-eclipse
5 years ago

Suggested Behaviour - Title shown on hover to indicate what the menu item is for

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


5 years ago

#2 @afercia
5 years ago

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

Discussed during today's accessibility meeting. The admin menu is the result of years of backwards compatibility and its code is far from ideal.

Ideally, it should be rebuilt from scratch, which it’s unlikely to happen :) On the other hand, Gutenberg introduced the “tooltips” pattern. Similarly, the admin menu could use tooltips.

The menu changes to display only the icon when the menu auto-folds in the medium responsive view or when it’s collapsed by users. Not sure the auto-fold still makes sense, as it happens only in a very limited range of the viewport width. Under a certain width, there’s now the responsive view. Would be nice to explore it auto-fold can be removed.

That's just to say that touching the admin menu is a challenging task but if anyone comes up with a patch, that would be very welcome :)

#3 @garrett-eclipse
5 years ago

  • Owner set to garrett-eclipse
  • Status changed from new to assigned

Thanks @afercia I appreciate the feedback. Caught that in #accessibility earlier and like the idea of removing the auto-fold. Or even unfolding the entire menu on hover as I've seen that pattern be successful on other applications. A bit backlogged right now but will take a stab at a patch later next month. Cheers

Note: See TracTickets for help on using tickets.