[wp-trac] [WordPress Trac] #59733: Disabled form controls should not use cursor: pointer

WordPress Trac noreply at wordpress.org
Tue Oct 31 13:19:54 UTC 2023


#59733: Disabled form controls should not use cursor: pointer
-----------------------------------------+---------------------------------
 Reporter:  afercia                      |       Owner:  afercia
     Type:  defect (bug)                 |      Status:  assigned
 Priority:  normal                       |   Milestone:  6.5
Component:  Administration               |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-screenshots needs-patch  |     Focuses:  ui, accessibility,
                                         |  css
-----------------------------------------+---------------------------------

Comment (by afercia):

 Four years ago the Gutenberg accessibility audit reported an issue about
 incorrect usage of the cursor pointer on buttons (and labels). See
 https://github.com/WordPress/gutenberg/issues/15343 and #47171.

 It is true that with native HTML/CSS browsers don't display a pointer
 cursor on any form element and label. If you are curious, you can for
 example have a look at Firefox's user agent stylesheet for form elements
 by entering this in your Firefox address bar: `resource://gre-
 resources/forms.css`. The only form element that gets a `cursor: pointer`
 is `input[type=image]`. Browers reserve the pointer cursor for links.

 That said, WordPress and other web applications set `cursor: pointer;` for
 form elements and labels to highlight they are 'interactive' elements.
 While that's non standard, I'd tend to recognize some value in doing that
 for form controls. However, given it's impossible to reliably reset the
 default cursor for labels of disabled controls, I'd like to propose to
 entirely remove the pointer cursor for label elements and only keep it for
 form controls. I'd think this is a good balance as nothing would change
 for inputs, selects, buttons etc.

 Worth also noting that there is an inconsistency between the styling of
 disabled select elements and the one for disabled radio buttons /
 checkboxes:
 - Disabled select: the cursor is reset to default.
 - Disabled radio buttons and checkboxes: the cursor is not reset to
 default.

 I'd call this a bug as there is no reason to make disabled form controls
 behave differently.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59733#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list