Accessibility: Improve focus management in the Media Views.

- keeps focus management only where necessary to avoid focus losses
- removes focus management where a specific user workflow was assumed
- makes the "Attachment Details" navigation buttons really disabled when there are no next or previous attachments
- adds inline comments to clarify all the usages of focus()

Fixes #43169.


git-svn-id: https://develop.svn.wordpress.org/trunk@45524 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia
2019-06-12 21:02:03 +00:00
parent 2b919ee051
commit 6551660d55
17 changed files with 161 additions and 90 deletions
+2 -5
View File
@@ -682,14 +682,11 @@ border color while dragging a file over the uploader drop area */
content: "\f345";
}
.edit-attachment-frame .edit-media-header .left.disabled,
.edit-attachment-frame .edit-media-header .right.disabled,
.edit-attachment-frame .edit-media-header .left.disabled:hover,
.edit-attachment-frame .edit-media-header .right.disabled:hover {
.edit-attachment-frame .edit-media-header [disabled],
.edit-attachment-frame .edit-media-header [disabled]:hover {
color: #ccc;
background: inherit;
cursor: default;
pointer-events: none;
}
.edit-attachment-frame .media-frame-content,