Make WordPress Core


Ignore:
Timestamp:
09/23/2019 02:42:36 PM (7 years ago)
Author:
afercia
Message:

Accessibility: Improve and modernize user interface controls for better contrast. First part: buttons and links.

  • Introduces new styles for the buttons, with better contrast for borders and better focus style.
  • Introduces a new focus style for links.
  • The new styles improve consistency with the ones used in the new Block Editor (Gutenberg).

Props michaelarestad, truchot, mor10, kellychoffman, adamsoucie, paaljoachim, Joen, kjellr, melchoyce, karmatosed, audrasjb, afercia.
Fixes #34904.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/common.css

    r46207 r46241  
    273273.wp-person a:focus .gravatar {
    274274    color: #124964;
    275     box-shadow:
    276         0 0 0 1px #5b9dd9,
    277         0 0 2px 1px rgba(30, 140, 190, 0.8);
    278     /* Only visible in Windows High Contrast mode */
    279     outline: 1px solid transparent;
     275    outline: 1px dotted #555d66;
    280276}
    281277
     
    285281
    286282#adminmenu a:focus {
    287     box-shadow: none;
    288     /* Only visible in Windows High Contrast mode */
    289     outline: 1px solid transparent;
     283    outline: 1px dotted #555d66;
    290284    outline-offset: -1px;
    291285}
     
    624618    top: -3px;
    625619    text-decoration: none;
    626     border: none;
    627     border: 1px solid #ccc;
     620    border: 1px solid #7e8993;
    628621    border-radius: 2px;
    629     background: #f7f7f7;
    630622    text-shadow: none;
    631623    font-weight: 600;
    632624    font-size: 13px;
    633625    line-height: normal; /* IE8-IE11 need this for buttons */
    634     color: #0073aa; /* some of these controls are button elements and don't inherit from links */
     626    color: #555; /* use the standard color used for buttons */
    635627    cursor: pointer;
    636628}
     
    642634.wrap .add-new-h2:hover, /* deprecated */
    643635.wrap .page-title-action:hover {
    644     border-color: #008EC2;
    645     background: #00a0d2;
    646     color: #fff;
     636    background: #f3f5f6;
     637    border-color: #7e8993;
     638    color: #007cba;
    647639}
    648640
    649641/* lower specificity: color needs to be overridden by :hover and :active */
    650642.page-title-action:focus {
    651     color: #124964;
     643    color: #016087;
    652644}
    653645
     
    659651
    660652.wrap .page-title-action:focus {
    661     border-color: #5b9dd9;
    662     box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);
     653    border-color: #007cba;
     654    box-shadow: 0 0 0 1px #007cba;
    663655    /* Only visible in Windows High Contrast mode */
    664656    outline: 2px solid transparent;
     
    842834
    843835.tagchecklist .ntdelbutton:focus .remove-tag-icon:before {
    844     box-shadow:
    845         0 0 0 1px #5b9dd9,
    846         0 0 2px 1px rgba(30, 140, 190, 0.8);
     836    outline: 1px dotted #555d66;
    847837}
    848838
     
    14421432
    14431433.notice-dismiss:focus {
    1444     outline: none;
    1445     box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8);
     1434    outline: 1px dotted #555d66;
    14461435}
    14471436
     
    30713060
    30723061.js .postbox .handlediv:focus .toggle-indicator:before {
    3073     box-shadow:
    3074         0 0 0 1px #5b9dd9,
    3075         0 0 2px 1px rgba(30, 140, 190, 0.8);
     3062    outline: 1px dotted #555d66;
    30763063}
    30773064
     
    31673154[role="treeitem"] .folder-label.focus {
    31683155    color: #124964;
    3169     box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8);
     3156    outline: 1px dotted #555d66;
    31703157}
    31713158[role="treeitem"].hover,
     
    33943381
    33953382.widget-top .widget-action:focus .toggle-indicator:before {
    3396     box-shadow:
    3397         0 0 0 1px #5b9dd9,
    3398         0 0 2px 1px rgba(30, 140, 190, 0.8);
     3383    outline: 1px dotted #555d66;
    33993384}
    34003385
Note: See TracChangeset for help on using the changeset viewer.