Opened 11 months ago
Closed 6 months ago
#63239 closed defect (bug) (fixed)
Button focus visibility issue in media upload page
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | 6.6 |
| Component: | Media | Keywords: | has-patch has-screenshots has-test-info commit |
| Focuses: | ui, accessibility, css, administration | Cc: |
Description
When visiting wp-admin/media-new.php in WordPress and uploading a new image, clicking the Edit button from the uploaded media list does not show proper focus visibility. The button outline is barely noticeable, making it difficult for users to identify the focused element.
Steps to Reproduce:
- Navigate to
wp-admin/media-new.php. - Upload an image.
- Click on the Edit button from the uploaded media list.
- Observe the focus visibility of the button.
Expected Behavior:
The button should have a clearly visible focus state to improve accessibility and user experience.
Actual Behavior:
The focus outline or indicator is not properly visible, making it unclear whether the button is selected.
Attachments (6)
Change History (29)
This ticket was mentioned in PR #8656 on WordPress/wordpress-develop by @dilipbheda.
11 months ago
#1
#2
@
11 months ago
- Keywords has-testing-info added
Test Report
This report validates that the indicated patch addresses the issue.
Patch tested:
Environment
OS: macOS 14.6.1
Web Server: PHP.wasm
PHP: 7.4.31-dev
WordPress: 6.8-alpha-20250130.101504
Browser: Chrome Version 133.0.6943.142
Theme: Twenty Twenty-Five Theme Version 1.1
Actual Results
The button has a clearly visible focus state which is improving the accessibility and user experience.
#4
@
11 months ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/8656
Environment
- WordPress: 6.9-alpha-20250404.184002
- PHP: 7.4.31-dev
- Server: PHP.wasm
- Database: WP_SQLite_Translator (Server: 5.5 / Client: 3.40.1)
- Browser: Chrome 134.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.1
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
✅ Button visibility is fixed with the patch.
Supplemental Artifacts
#5
@
9 months ago
PR 8656 works fine, but in rare cases where the image has a long file name, it moves the file name below the image on mobile devices, which differs from the current behaviour. Attached an alternative patch.
#8
@
9 months ago
- Focuses ui css added
Button focus visibility issue in media upload page
Expected Result:
When the Edit button is clicked, the click/ripple/hover effect should be:
- Fully visible
- Square-shaped and contained within the button boundary
- Not hidden behind or overflowing into image previews or other UI elements
Actual Result:
The click effect on the Edit button:
- Appears clipped or partially hidden
- Overflows or is obstructed by the image preview container
- Does not render as a clean square
OS: Windows (x86) 10
Chrome version: Chrome 136.0.7103.113
#9
follow-up:
↓ 10
@
9 months ago
- Type changed from defect (bug) to enhancement
Test Report
The findings in this report confirm that the submitted patch appropriately resolves the issue at hand.
Patch tested:
Environment
OS: Windows 11
Web Server: nginx
PHP: 8.2.27
WordPress: 6.8.1
Browser: Chrome Version 136.0.7103.114
Theme: Twenty Twenty Theme Version 2.9
Actual Results
The visible focus state of the button significantly improves accessibility and contributes to a better user experience.
#10
in reply to:
↑ 9
@
9 months ago
- Keywords dev-feedback added
Replying to dilip2615:
Test Report
The findings in this report confirm that the submitted patch appropriately resolves the issue at hand.
There are 650 reports that `needs-testing`
And this report doesn't have a needs-testing tag, but the more tests, the better, let's go!
#11
@
8 months ago
- Milestone changed from Awaiting Review to 6.9
- Owner set to joedolson
- Status changed from new to accepted
#12
@
8 months ago
- Type changed from enhancement to defect (bug)
- Version set to 6.6
(started with [58279])
#14
@
8 months ago
PRs 8656 and 9027 both show the overflow for the .filename container and remove padding from the Edit link.
- As mentioned in comment:5, the overflow is hidden so the media details do not wrap below the floating image (when the filename is very long and/or the thumbnail is shorter than it is wide).
- With its current padding, the "Edit" link is 21.8 by 46.2 pixels in English. I would not recommend reducing the target size to less than 24 pixels in both dimensions (21.8 by 18.2 if padding is
0). - If the Edit link height is reduced at all,
.attachment-toolsmight need a top margin like what @umesh.nevase proposed in PR 9027.
In PR 8785, @ankitkumarshah proposed adding 2 pixels of margin on the left of the Edit link. Then the "Edit" text would not line up with the details above it, but the focus outline would show properly.
63239.patch adds 2 pixels of padding on the left of the .media-item .filename element. If this general direction is best, I suggest matching that padding value on the right side. The additional padding also creates a trivial discrepancy of 14 pixels on the left of the .pinkynail image and 16 pixels on the right, but the image margin could be reduced to compensate. Using a value of 2 pixels, that would become:
.media-item .pinkynail {
margin: 14px 12px 14px 14px;
}
.media-item .filename {
padding: 14px 2px;
}
This ticket was mentioned in PR #9274 on WordPress/wordpress-develop by @joedolson.
7 months ago
#15
This is an alternate solution for 63239, switching the parent container to flex & removing overflow: hidden.
Trac ticket: https://core.trac.wordpress.org/ticket/63239
#16
@
7 months ago
I added an alternate solution for this, which switches .media-item-wrapper .attachment-details to display: flex and removes overflow: hidden; to solve the issue. Removes float: left, which no longer applies.
This doesn't adjust any padding or margin, and just allows the outline to show.
This ticket was mentioned in PR #9322 on WordPress/wordpress-develop by PANawkar.
7 months ago
#17
Trac ticket:
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
7 months ago
@sabernhardt commented on PR #9274:
7 months ago
#20
The overflow: hidden rule can help wrap long file names (when hyphenated).
Before:
With this flexbox patch, the page has a horizontal scrollbar to show the full file name:
Long file names with underscores might also need word-wrap: break-word (or overflow-wrap) on the .media-list-title and .media-list-subtitle elements, but that did not work for me without hiding the overflow on the container.
@
7 months ago
edits padding and margin to show the full focus outline and to give slight padding on the right, and also assigns classes to wrap long words
#21
@
7 months ago
I attempted to keep 63239.padding-plus-word-wrap.patch simple with small changes to .media-item .filename for the focus outline. Then I included the classes to wrap long file names that have no hyphens (not in the scope of this ticket).

Before