Make WordPress Core

Opened 3 months ago

Last modified 6 weeks ago

#64064 new defect (bug)

Twenty Ten: remove auto-focus script from 404 template

Reported by: sabernhardt's profile sabernhardt Owned by:
Milestone: 7.0 Priority: normal
Severity: normal Version: 3.0
Component: Bundled Theme Keywords: has-patch
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 3 months ago.
64064.1.diff (486 bytes) - added by sabernhardt 4 days ago.
refreshed after r61440

Download all attachments as: .zip

Change History (6)

@sabernhardt
3 months ago

#1 @sabernhardt
3 months ago

  • Keywords has-patch added

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


2 months ago

#3 @joedolson
2 months ago

  • Milestone changed from Awaiting Review to 7.0

#4 @ravichudasama01
6 weeks 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
4 days ago

refreshed after r61440

Note: See TracTickets for help on using tickets.