Opened 4 weeks ago
Last modified 3 days ago
#65881 new defect (bug)
Toolbar: Increase the height to 48 pixels for both desktop and mobile
| Reported by: | afercia | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.2 |
| Component: | Toolbar | Version: | |
| Severity: | normal | Keywords: | needs-design-feedback |
| Cc: | Focuses: | accessibility, css |
Description
Related: #65091, #65849, #65445.
Historically, the toolbar (the admin bar) height has always been 32 pixels and then adjusted to 46 pixels in the responsive view.
This point was recently discussed in the context of the various changes for the Toolbar in WordPress 7.1 and some contributors from the accessibility team pointed out the 32 pixels height appears to be too small for today's average displays and DPI.
The limited height makes hard adding some good focus style.
Also, themes (for the front end) and plugins (for the admin) are forced to take the variable height in account and provide their own styles for the desktop and responsive view, especially when they used fixed / sticky toolbars.
By increasing the toolbar height and making always the same for both desktop and mobile:
- the CSS would greatly simplified
- there would be more space for additional styling e.g. the focus style
- readability would improve
- work for theme and plugin authors would be greatly simplified
- it is also worth noting thet right now a
mobileCSS class is added to the body (and used to style the toolbar) on the PHP side when the device in use is detected to be a mobile device. This is done via thewp_is_mobile()function and this part could be entirely removed.
Backward compatibility
Many themes and plugins are unmaintained and this should be taken into account. Id' be in favor of considering any sort of opt-in mechanism, for example a theme support of any other kind of flag for plugins and themes. This needs to be considered carefully.
Change History (8)
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
4 weeks ago
This ticket was mentioned in PR #13234 on WordPress/wordpress-develop by @dilip2615.
3 weeks ago
#3
- Keywords has-patch added
## Summary
- Sets the admin Toolbar height to a uniform 48px on desktop and responsive views (Trac #65881).
- Updates
--wp-admin--admin-bar--height, front-end bump styles, and Twenty Twenty / Twenty Twenty-One offsets that hard-coded 32px/46px. - Local Playwright checks passed for admin + front (desktop and <782px), including WP logo / My Account dropdown alignment.
## Test plan
- [ ] Log in and confirm Toolbar is 48px in wp-admin and on the front end
- [ ] Confirm front-end content is offset below the Toolbar (no overlap)
- [ ] Resize below 782px: height remains 48px; touch icons remain usable
- [ ] Open WP logo and My Account menus; menus align under the bar
- [ ] Spot-check Twenty Twenty and Twenty Twenty-One sticky/header offsets with the admin bar visible
Trac: https://core.trac.wordpress.org/ticket/65881
Made with Cursor
#4
@
3 weeks ago
- Keywords has-patch removed
Opened a PR for testing: https://github.com/WordPress/wordpress-develop/pull/13234
Sets the toolbar height to 48px on desktop and in responsive views, updates the CSS custom property and bump styles, and adjusts Twenty Twenty and Twenty Twenty-One.
@dilip2615 commented on PR #13234:
3 weeks ago
#5
#6
@
3 weeks ago
Thanks for the update, @joedolson
I will continue testing and take care of any additional changes needed for the 7.2 cycle.
#7
@
3 weeks ago
One more thing, @joedolson updated the GitHub PR description to remove tooling/attribution noise from the initial draft. Please refer to the current PR description for the summary and test plan:
https://github.com/WordPress/wordpress-develop/pull/13234
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Milestoning for 7.2 as part of an extensive need to update the adminbar.