Make WordPress Core

Opened 5 months ago

Closed 4 months ago

#63832 closed defect (bug) (fixed)

Loss of focus when setting or changing the Site Logo or Site Icon in Customizer

Reported by: joedolson's profile joedolson Owned by: joedolson's profile joedolson
Milestone: 6.9 Priority: normal
Severity: normal Version:
Component: Customize Keywords: has-patch commit
Focuses: accessibility, javascript Cc:

Description

When setting or changing a site logo or site icon, the active control is removed after assigning an icon, and focus is not explicitly set. This leads to a loss of focus.

Focus should be set to the first relevant button after the icon, which would be the "Remove" button.

Change History (9)

#1 @joedolson
5 months ago

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

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


5 months ago
#2

  • Keywords has-patch added

#3 @rishabhwp
5 months ago

Hi @joedolson,

I have submitted a PR addressing the focus loss issue when setting or changing the Site Logo or Site Icon in the Customizer. Could you please take a moment to review it? Thank you!

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


4 months ago

#5 @joedolson
4 months ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 6.9

@krupajnanda will give this an initial test. Thank you @rishabhwp!

@krupajnanda commented on PR #9499:


4 months ago
#6

## Test Report
### Description
This report validates that the indicated patch works as expected, as mentioned in this PR. ✅

### Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.29
  • Server: nginx/1.29.1
  • Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
  • Browser: Chrome 140.0.0.0
  • OS: macOS
  • Theme: Twenty Nineteen 3.1
  • MU Plugins: None activated
  • Plugins:
    • Query Monitor 3.19.0
    • Test Reports 1.2.0

### Actual Results

  1. ✅ Issue resolved with a patch.

### Additional Notes

  • Tested primarily with keyboard navigation (Tab, Shift+Tab, Enter, Space) ✅
  • Tested with a screen reader and focus remained as expected. ✅

### Supplemental Artifacts

https://github.com/user-attachments/assets/3699bf40-ed66-4542-96aa-69e3de7e54f3

#7 @pmbaldha
4 months ago

  • Keywords needs-testing removed

Test Report

Description

✅ This report validates whether the indicated patch works as expected.

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

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.29
  • Server: nginx/1.29.1
  • Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
  • Browser: Chrome 140.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Seventeen 3.9
  • MU Plugins:
    • test.php
  • Plugins:
    • Email Log 2.61
    • Test Reports 1.2.0

Actual Results

  1. ✅ Issue resolved with the patch.

Additional Notes

  • Tested primarily with keyboard navigation (Tab, Shift+Tab, Enter, Space) ✅
  • Tested with a screen reader and focus remained as expected. ✅

#8 @joedolson
4 months ago

  • Keywords commit added

#9 @joedolson
4 months ago

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

In 60785:

Customizer: Handle keyboard focus after adding site icon or logo.

Fix focus loss after assigning a site icon or a site logo in the customizer. Sets focus to the 'Remove' button immediately following the setting control.

Props joedolson, rishabhwp, krupajnanda, pmbaldha.
Fixes #63832.

Note: See TracTickets for help on using tickets.