Media Editor Modal: Fix unexpected tab stop on date fields in the Details sidebar#78454
Conversation
|
Size Change: +16 B (0%) Total Size: 7.97 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in 804cfda. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/26138090892
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Thanks for the speedy review!
Cheers, it's a little obscured but I split the fixes out into two since this PR fixes the media editor's logic and #78453 fixed it for the filename field (i.e. in that case it's the field itself that was causing the problem). Once they're both merged it should be all sorted on trunk. |
Oh, that went over my head 😄 Thanks for confirming! |
|
No worries, it wasn't super obvious that the two PRs were related in this flow 😄 |

What?
Part of:
Remove the unexpected tab stop in the Details tab of the experimental Media Editor Modal for the date added field (or, well, the date fields that we override in the form component).
Why?
This is a very similar PR to the one to fix the truncation of the filename field (#78453). Currently in trunk, in the details sidebar, if you tab through you unexpectedly land on both the "Date added" and "File name" fields because of their tooltips. #78453 fixes the file name field, and this PR fixes the Date added field.
In principle, what we want is for the full field value to be available to screen readers (and either be in the DOM markup or in an
aria-labelattribute) and for the tooltip to be available via hover. These fields should not create tab stops as they are otherwise non-interactive and are not buttons or input fields.How?
tabIndex={ -1 }to ensure the overridden field does not create a tab stoparia-labelattributeTesting Instructions
Date addedfield.Screenshots or screencast
This is the field I'm talking about. If you tab down from the close button you shouldn't be able to land on the "Date added" field, but the Tooltip should still be available on hover.
Use of AI Tools
Claude Code