[wp-trac] [WordPress Trac] #47171: Incorrect cursor used on buttons
WordPress Trac
noreply at wordpress.org
Tue May 7 17:22:47 UTC 2019
#47171: Incorrect cursor used on buttons
-------------------------+-------------------------------------------------
Reporter: nrqsnchz | Owner: (none)
Type: defect | Status: new
(bug) |
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses: ui, accessibility, coding-
| standards
-------------------------+-------------------------------------------------
Comment (by nrqsnchz):
Quoting comments from the GitHub Issue:
@afercia
> Same for all the <label> elements and buttons in core:
@getdave
> Does this need changing or are we sticking with the pattern established
in WP Core?
afercia
> For full compliance, it should be changed. I guess it needs be discussed
by the accessibility and design teams.
@kjell
> That's interesting! I've never known this was specifically against a11y
guidelines. In general on the web, I tend to expect that most "clickable"
elements use a pointer cursor (take the buttons here on GitHub for
instance, which have a cursor: pointer rule). I'd love to have more
discussion around this.
afercia
> Interesting issue, indeed. I don't think this is explicitly mentioned
anywhere in the WCAG (I may be wrong). However, it has more to do with
operating systems / browsers default: they shouldn't be changed unless
there are very, very, good reasons to do so.
> The native cursor style for buttons is default:
https://codepen.io/afercia/full/EzjXMo
> The W3C spec (CSS 2.2) linked above clearly states:
>> pointer: The cursor is a pointer that indicates a link.
> Same for CSS3 UI: https://www.w3.org/TR/css-ui-3/#cursor
> The rationale is that pointer should be reserved for links, to help
users differentiate UI controls that trigger navigation from buttons and
the like. Granted, in WordPress you never know if what are you going to
click is a button or a link 🙂For historical reasons, sometimes links are
styled as buttons, and buttons are styled as links. Ideally, this
shouldn't happen. Links should be clearly identified as links. Buttons
should be identified as buttons.
> After some software archeology, turns out some of the related changes
are very ancient:
> <label> elements got their cursor: pointer 15 years ago in:
https://core.trac.wordpress.org/changeset/560 no related Trac ticket.
> <button> elements 11 years ago in:
https://core.trac.wordpress.org/changeset/7215 related Trac ticket:
https://core.trac.wordpress.org/ticket/5943
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47171#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list