Make WordPress Core

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#64727 closed defect (bug) (fixed)

Classic Editor: set background, positioning and height for Skip to Editor link

Reported by: sabernhardt's profile sabernhardt Owned by: joedolson's profile joedolson
Milestone: 7.0 Priority: normal
Severity: normal Version: trunk
Component: Editor Keywords: has-patch commit
Focuses: css Cc:

Description

In 7.0, the 'Skip to Editor' link is larger and has a transparent background, which is inappropriate above the title field.

Between the 600- and 850-pixel breakpoints, the link's padding can cause the page to scroll horizontally. (This already happened in WordPress 6.9, but now the link is 12 pixels wider and the admin toolbar goes further off-screen.)

Attachments (2)

classic-trunk-focus-640.png (20.3 KB) - added by sabernhardt 3 months ago.
Skip to Editor link, visible on focus, at 640 pixels wide
classic-trunk-wide-640.png (18.9 KB) - added by sabernhardt 3 months ago.
Without focus, the skip link makes the page wider than the viewport

Download all attachments as: .zip

Change History (10)

@sabernhardt
3 months ago

Skip to Editor link, visible on focus, at 640 pixels wide

@sabernhardt
3 months ago

Without focus, the skip link makes the page wider than the viewport

This ticket was mentioned in PR #11053 on WordPress/wordpress-develop by @sabernhardt.


3 months ago
#1

  • Keywords has-patch added
  • Assigns the right positioning value regardless of whether the link has focus, to avoid horizontal scroll.
  • Sets the background color to white.
  • Reduces the line-height and min-height.
  • Keeps the top value of 4 pixels for any screen width.

Trac 64727

Use of AI Tools: none

@sabernhardt commented on PR #11053:


3 months ago
#2

The 32-pixel height matches the plugin action buttons (since r61729).

#3 @joedolson
3 months ago

  • Owner set to joedolson
  • Status changed from new to accepted

#4 @huzaifaalmesbah
3 months ago

Patch Testing Report

Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11053

Environment

  • WordPress: 7.0-beta1-61709-src
  • PHP: 8.2.29
  • Server: nginx/1.29.5
  • Database: mysqli (Server: 8.4.8 / Client: mysqlnd 8.2.29)
  • Browser: Chrome 145.0.0.0
  • OS: macOS
  • Theme: Twenty Eleven 5.0
  • MU Plugins: None activated
  • Plugins:
    • Classic Editor 1.6.7
    • Test Reports 1.2.1

Steps taken

  1. Opened Classic Editor (Posts → Add New).
  2. Resized viewport to 600px–850px and 480px.
  3. Observed horizontal scroll and overflow before patch.
  4. Applied PR #11053 and retested.
  5. ✅ Patch is solving the problem

Expected result

  • No horizontal scroll.
  • Proper positioning and 32px height.
  • White background.
  • Admin toolbar fully visible.

Result

Issue fixed at 600px+ and 480px. No overflow after patch.

Screenshots

Before Apply Patch After Apply Patch ✅
https://i.ibb.co/n8RhhkQn/Huzaifa-20260226052746.png https://i.ibb.co/chYV5fPh/Huzaifa-20260226052950.png
Last edited 3 months ago by huzaifaalmesbah (previous) (diff)

#5 @joedolson
3 months ago

  • Keywords commit added

Also tested and confirmed. Marking for commit.

#6 @joedolson
3 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 61742:

Editor: (Classic) Fix "skip to editor" link CSS.

Fix the height, background, and positioning of the skip to editor link in the classic editor, to prevent overflow and override transparent background.

Props sabernhardt, huzaifaalmesbah, joedolson.
Fixes #64727.

@sabernhardt commented on PR #11053:


3 months ago
#7

Trunk, before patch With patch
With focus, at 640px and 1000px<br>https://github.com/user-attachments/assets/7d270442-7bc6-44e0-a451-b1a078de9e6d<br>https://github.com/user-attachments/assets/c8835f70-17e5-4b4c-8a84-86db0319b80c With focus, at 640px and 1000px<br>https://github.com/user-attachments/assets/314c0c5f-4610-476d-b6e7-43e074abfec9<br>https://github.com/user-attachments/assets/6c622017-cd22-43ac-983b-c992828a9410
No focus, at 640px<br>https://github.com/user-attachments/assets/06380502-a6bb-4740-ac41-f1133314ed7b No focus, at 640px<br>https://github.com/user-attachments/assets/1b789992-903f-4fae-817c-ae7fe4502852

For comparison, 6.9.1 had a smaller link:
https://github.com/user-attachments/assets/0100d0f9-3cdf-45be-8498-ef9d3e90569b
And the horizontal scroll was less noticeable:
https://github.com/user-attachments/assets/6dd91e20-f21d-4560-be9f-624315fe1ec9

@sabernhardt commented on PR #11053:


3 months ago
#8

Committed in r61742

Note: See TracTickets for help on using tickets.