Make WordPress Core

Opened 4 months ago

Closed 3 months ago

Last modified 2 months ago

#62969 closed defect (bug) (fixed)

Twenty Fourteen: Skip link out of order

Reported by: joedolson's profile joedolson Owned by: joedolson's profile joedolson
Milestone: 6.8 Priority: normal
Severity: normal Version: 3.8
Component: Bundled Theme Keywords: has-patch has-screenshots commit
Focuses: accessibility Cc:

Description (last modified by sabernhardt)

The skip link should be the first focusable object in the page; it's disorienting for it to appear in any other order. The skip link should be moved to the top of the body.

Attachments (4)

2014 - before.png (86.9 KB) - added by vgnavada 4 months ago.
2014 - after.png (82.4 KB) - added by vgnavada 4 months ago.
twenty-fourteen-after-patch.png (47.2 KB) - added by shailu25 4 months ago.
After Patch
62969.diff (1.2 KB) - added by joedolson 4 months ago.
Refreshed patch

Download all attachments as: .zip

Change History (20)

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


4 months ago
#1

  • Keywords has-patch added

Trac ticket: 62969

#2 @shanemuir
4 months ago

  • Keywords needs-testing added

#3 @joedolson
4 months ago

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

#4 @manojmaharrshi
4 months ago

Test Report

Description

This report validates whether the focus for Skip link is moved to top of the order

Patch tested: https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/8326.diff

Environment

  • WordPress: 6.8-alpha-59840
  • PHP: 8.1.29
  • Server: nginx/1.16.0
  • Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.29)
  • Browser: Chrome 133.0.0.0
  • OS: macOS
  • Theme: Twenty Fourteen 4.1
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0
    • WordPress Beta Tester 3.6.2

Actual Results

  1. ✅ Issue resolved with patch.

#5 @vgnavada
4 months ago

  • Keywords has-screenshots added

Test Report

Description

Hi, I've tested the TWENTY FOURTEEN theme with the added fix on Playground and it is working as expected.

Patch tested: https://github.com/WordPress/wordpress-develop/pull/8326

Environment

  • WordPress: 6.8-alpha-20250217.045205
  • PHP: 7.4.31-dev
  • Server: PHP.wasm
  • Database: WP_SQLite_Translator (Server: 5.5 / Client: 3.40.1)
  • Browser: Chrome 132.0.0.0
  • OS: macOS
  • Theme: Twenty Fourteen 4.1
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ✅ Issue resolved with patch.

Additional Notes

  • Also working fine in responsive versions

Supplemental Artifacts

Add as Attachment

Last edited 4 months ago by vgnavada (previous) (diff)

This ticket was mentioned in Slack in #core-test by vgnavada. View the logs.


4 months ago

#7 @shailu25
4 months ago

Test Report

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

Environment:
WordPress - 6.7.2
OS - Windows
Browser - Firefox
Theme: Twenty Fourteen
PHP - 8.2.12
Active Plugin: None

Actual Results:

  • Issue resolved with patch.✅

Screenshots:

  • Added Attachment

@shailu25
4 months ago

After Patch

@joedolson
4 months ago

Refreshed patch

#8 @joedolson
4 months ago

  • Keywords commit added; needs-testing removed

Refreshed the patch to account for changes in [59907]

#9 @joedolson
4 months ago

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

In 59914:

Bundled Themes: Twenty Fourteen: Move skip link to top of body.

Move the skip link to the top of the body content, so it is the first focusable item on the page.

Props joedolson, abcd95, manojmaharrshi, vganavda, shailu25.
Fixes #62969.

@sabernhardt commented on PR #8326:


4 months ago
#10

Here are screenshots for Twenty Fourteen's "Skip to content" link.

Before r59914:

https://github.com/user-attachments/assets/016a4834-c83d-4901-b964-b5cf0c2b5b12

Now, the skip link appears:

  • in the top corner of a header image when the site has one
  • below the header bar on large screens when the site does not have a header image (because .site has relative positioning)
  • in front of the header bar on small screens when the site does not have a header image

https://github.com/user-attachments/assets/f0c83296-3aab-47bd-aafc-25a4e940241f

#11 @sabernhardt
4 months ago

  • Description modified (diff)
  • Keywords good-first-bug commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

I like having the skip link inside the #page div for Twenty Twelve and Twenty Thirteen. However, with Twenty Fourteen's relative positioning on .site, adding it before the div might be a better choice. I'm reopening the ticket to consider both options.

If the link is worth moving earlier again, anyone who clicks a link directing to #page would not reach the skip link by tabbing forward, but the skip link itself could have a new id.

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


4 months ago
#12

Moves skip link between wp_body_open() and <div id="page">, as @himanshupathak95 originally had in the first pull request.

With this, the link would appear consistently in the top corner.

https://github.com/user-attachments/assets/69286722-5d7f-4d67-9583-4afa5c118bf8

Trac 62969

@sabernhardt commented on PR #8470:


4 months ago
#13

I also arranged the screenshots to compare each version side-by-side.

https://github.com/user-attachments/assets/d20e51aa-5ec3-44df-917a-e2fe5f4d4b19

https://github.com/user-attachments/assets/03555fa2-1462-4bea-a704-a560dd5c5fbd

#14 @joedolson
3 months ago

  • Keywords commit added

This seems like a reasonable change. Having better consistency in position will be less disorienting to users. Marking for commit.

#15 @joedolson
3 months ago

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

In 59991:

Bundled Themes: Move skip link from #page to body in Twenty Fourteen.

Improvement following [59914] to make the position of the skip to content link consistent across different states and viewports.

Props sabernhardt, himanshupathak95, joedolson.
Fixes #62969.

@sabernhardt commented on PR #8470:


2 months ago
#16

Committed in r59991

Note: See TracTickets for help on using tickets.