Make WordPress Core

Opened 12 months ago

Closed 8 months ago

#64064 closed defect (bug) (fixed)

Twenty Ten: remove auto-focus script from 404 template

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

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 12 months ago.
64064.1.diff (486 bytes ) - added by sabernhardt 8 months ago.
refreshed after r61440

Download all attachments as: .zip

Change History (9)

@sabernhardt
12 months ago

#1 @sabernhardt
12 months ago

  • Keywords has-patch added

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


10 months ago

#3 @joedolson
10 months ago

  • Milestone Awaiting Review7.0

#4 @ravichudasama01
10 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
8 months ago

refreshed after r61440

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


8 months ago

#6 @joedolson
8 months ago

  • Keywords commit added
  • Owner set to joedolson
  • Status newaccepted

#7 @joedolson
8 months ago

  • Resolutionfixed
  • Status acceptedclosed

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.