Accessibility: Add focus styles for Windows High Contrast mode.

Introduces in core new focus styles dedicated to Windows High Contrast mode. The 
new styles use a transparent CSS outline as already explored in the Block Editor.
This first part covers some of the main user interface controls like buttons, links,
and media views elements. Other parts will be addressed in the next future.

Fixes #41286.

Built from https://develop.svn.wordpress.org/trunk@44544


git-svn-id: http://core.svn.wordpress.org/trunk@44375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia
2019-01-10 16:47:50 +00:00
parent c40ae024cd
commit 7481337591
31 changed files with 175 additions and 65 deletions

View File

@@ -310,10 +310,12 @@
}
#find-posts-close:focus {
outline: none;
box-shadow:
0 0 0 1px #5b9dd9,
0 0 2px 1px rgba(30, 140, 190, .8);
/* Only visible in Windows High Contrast mode */
outline: 2px solid transparent;
outline-offset: -2px;
}
#find-posts-close:before {
@@ -528,7 +530,9 @@ border color while dragging a file over the uploader drop area */
box-shadow:
inset 0 0 2px 3px #f1f1f1,
inset 0 0 0 7px #5b9dd9;
outline: none;
/* Only visible in Windows High Contrast mode */
outline: 2px solid transparent;
outline-offset: -6px;
}
.media-frame.mode-grid .selected.attachment {
@@ -681,6 +685,14 @@ border color while dragging a file over the uploader drop area */
box-shadow: none;
}
.upload-php .media-modal-close:focus,
.edit-attachment-frame .edit-media-header .left:focus,
.edit-attachment-frame .edit-media-header .right:focus {
/* Only visible in Windows High Contrast mode */
outline: 2px solid transparent;
outline-offset: -2px;
}
.upload-php .media-modal-close:focus .media-modal-icon:before,
.upload-php .media-modal-close:hover .media-modal-icon:before {
color: #000;
@@ -1079,8 +1091,9 @@ border color while dragging a file over the uploader drop area */
.image-editor .imgedit-settings .imgedit-help-toggle:focus {
color: #0074a2;
border-color: #5b9dd9;
outline: none;
box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );
/* Only visible in Windows High Contrast mode */
outline: 2px solid transparent;
}
.form-table td.imgedit-response {