Make WordPress Core

Changeset 57520


Ignore:
Timestamp:
02/02/2024 09:53:07 AM (14 months ago)
Author:
afercia
Message:

Administration: Accessibility: Use the default cursor style for labels and disabled form controls.

The native cursor style for labels and form controls is default, which is the platform-dependent default cursor. Typically an arrow. Historically, WordPress always used the pointer style for all form controls and labels. While this isn't standard, there is some value in using the pointer style for form controls. However, labels should use the default style especially when the associated controls are disabled.
Additionally, makes sure the disabled styling works for form controls with an aria-disabled="true" attribute.

Props joedolson, afercia.
Fixes #59733.

Location:
trunk/src
Files:
3 edited

Legend:

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

    r56636 r57520  
    2121    line-height: 1.42857143; /* 20px */
    2222    resize: vertical;
    23 }
    24 
    25 label {
    26     cursor: pointer;
    2723}
    2824
     
    288284input[type="file"]:disabled,
    289285input[type="file"].disabled,
     286input[type="file"][aria-disabled="true"],
    290287input[type="range"]:disabled,
    291 input[type="range"].disabled {
     288input[type="range"].disabled,
     289input[type="range"][aria-disabled="true"] {
    292290    background: none;
    293291    box-shadow: none;
     
    297295input[type="checkbox"]:disabled,
    298296input[type="checkbox"].disabled,
     297input[type="checkbox"][aria-disabled="true"],
    299298input[type="radio"]:disabled,
    300299input[type="radio"].disabled,
     300input[type="radio"][aria-disabled="true"],
    301301input[type="checkbox"]:disabled:checked:before,
    302302input[type="checkbox"].disabled:checked:before,
     
    304304input[type="radio"].disabled:checked:before {
    305305    opacity: 0.7;
     306    cursor: default;
    306307}
    307308
     
    357358}
    358359
     360.wp-core-ui select[aria-disabled="true"] {
     361    cursor: default;
     362}
     363
    359364/* Reset Firefox inner outline that appears on :focus. */
    360365/* This ruleset overrides the color change on :focus thus needs to be after select:focus. */
  • trunk/src/wp-admin/css/install.css

    r57363 r57520  
    7171    padding: 0;
    7272    margin: 0;
    73 }
    74 
    75 label {
    76     cursor: pointer;
    7773}
    7874
  • trunk/src/wp-includes/css/buttons.css

    r56639 r57520  
    186186}
    187187
     188.wp-core-ui .button[aria-disabled="true"],
     189.wp-core-ui .button-secondary[aria-disabled="true"] {
     190    cursor: default;
     191}
     192
    188193/* Buttons that look like links, for a cross of good semantics with the visual */
    189194.wp-core-ui .button-link {
     
    284289}
    285290
     291.wp-core-ui .button-primary[aria-disabled="true"] {
     292    cursor: default;
     293}
     294
    286295/* ----------------------------------------------------------------------------
    287296  4.0 - Button Groups
Note: See TracChangeset for help on using the changeset viewer.