Make WordPress Core

Opened 8 months ago

Closed 5 months ago

#64064 closed defect (bug) (fixed)

Twenty Ten: remove auto-focus script from 404 template

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

Description

(splitting from comment:6:ticket:63806)

Twenty Ten's 404 template automatically jumps to the search field, passing the heading and explanatory paragraph. It also skips the navigation, which people might prefer using instead of the search box.

Related: comment:16:ticket:29102

Attachments (2)

64064.diff (509 bytes) - added by sabernhardt 8 months ago.
64064.1.diff (486 bytes) - added by sabernhardt 5 months ago.
refreshed after r61440

Download all attachments as: .zip

Change History (9)

@sabernhardt
8 months ago

#1 @sabernhardt
8 months ago

  • Keywords has-patch added

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


7 months ago

#3 @joedolson
7 months ago

  • Milestone changed from Awaiting Review to 7.0

#4 @ravichudasama01
6 months ago

I tested this change on Twenty Ten’s 404 template, and the results are below:-

Before the patch:
The search field grabbed focus immediately on page load, which skipped past the “Not Found” heading and intro text. Keyboard users and screen-reader users would land straight inside the search box with no context.

Please refer below screenshot for before results:-
https://prnt.sc/P3EL_M92Xs00

After applying the patch:
The autofocus script is removed, and the page now loads in a much more natural and accessible reading order.

Please refer below screenshot for after results:-
https://prnt.sc/gEeurgtuLU3V

@sabernhardt
5 months ago

refreshed after r61440

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


5 months ago

#6 @joedolson
5 months ago

  • Keywords commit added
  • Owner set to joedolson
  • Status changed from new to accepted

#7 @joedolson
5 months ago

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

In 61515:

Bundled Themes: A11y: Remove auto-focus in Twenty Ten.

Remove the autofocus script in Twenty Ten that forced a bypass of the navigation, main heading, and explanation on the 404 error page.

Props sabernhardt, ravichudasama01, joedolson.
Fixes #64064.

Note: See TracTickets for help on using tickets.