Make WordPress Core

Opened 6 weeks ago

Closed 6 weeks ago

#65715 closed defect (bug) (fixed)

Theme browser: Inconsistent behavior of navigation when on the first theme

Reported by: afercia Owned by: afercia
Priority: normal Milestone: 7.1
Component: Themes Version:
Severity: normal Keywords: has-patch commit
Cc: Focuses: accessibility

Description

Discovered while reviewing https://github.com/WordPress/wordpress-develop/pull/11560 / https://core.trac.wordpress.org/ticket/63760

Occurs only in the WP Admin > Appearance, theme browser. Does not occur in the Customize theme browser.

  • Go to wp-admin/themes.php.
  • Click on any theme 'Theme Details' (note that it appears on hover).
  • The theme browser modal dialog opens.
  • Press the Right arrow key to navigate to the next theme.
  • Once on the last theme, observe that the Right arrow key doesn't do anything.
  • Press the Left arrow key to navigate to the previous theme.
  • Once on the first theme, observe that the Left arrow key re-starts navigation from the last theme although the Previous button with the left chevron icon looks disabled to indicate the theme browser is at the beginning of the themes collection.

Compare with the behavior in the Customizer theme browser:

  • Activate a Theme to access the Customizer, for example: Twenty Twenty-One.
  • Access the Customizer.
  • In the left panel, click 'Change' to open the customize theme browser.
  • Click on any theme 'Theme Details' (note that it appears on hover).
  • Test the navigation with arrow keys as described above.
  • Observe the left arrow key doesn't do anything when on the first theme, as expected.

Change History (5)

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


6 weeks ago
#1

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/65715

## Use of AI Tools

None

#2 @afercia
6 weeks ago

  • Milestone Awaiting Review7.1

In https://github.com/WordPress/wordpress-develop/pull/12696 I'm adding a simple check to bail early previous navigation when on the first theme.
It's a very small, self-contained, change. Moving to 7.1 consideration.

#3 @joedolson
6 weeks ago

  • Owner set to joedolson
  • Status newaccepted

#4 @afercia
6 weeks ago

  • Keywords commit added
  • Owner changed from joedolson to afercia
  • Status acceptedassigned

#5 @afercia
6 weeks ago

  • Resolutionfixed
  • Status assignedclosed

In 62869:

Themes: Fix inconsistent navigation to the previous theme in the Theme browser.

Prevents unintended 'wrap-around' behavior in the Theme browser overlay when navigating to the previous theme while already on the first theme in the collection. The navigation now stops at the first theme. This is consistent with the navigation to the next theme, which stops at the last theme.

Developed in https://github.com/WordPress/wordpress-develop/pull/12696

Props joedolson, afercia.
Fixes #65715.

Note: See TracTickets for help on using tickets.