User Experience Stack Exchange is a question and answer site for user experience researchers and experts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A friend was asking me why <button> HTML elements don't have a CSS cursor pointer by default?

It is the default behavior for links, and can be achieved on a button with

button { cursor:pointer; }

Still, why this difference? Sources are a plus.

share|improve this question
1  

Here's why:

Microsoft’s design guides talk about weak affordance:

Text and graphics links use a hand […] pointer […] because of their weak affordance. While links may have other visual clues to indicate that they are links (such as underlines and special placement), displaying the hand pointer on hover is the definitive indication of a link. To avoid confusion, it is imperative not to use the hand pointer for other purposes. For example, command buttons already have a strong affordance, so they don’t need a hand pointer. The hand pointer must mean “this target is a link” and nothing else.

Apple’s Human Interface Guidelines states that the hand cursor should be used when “the content is a URL link”.

W3C User Interface guidelines says the same thing again with “The cursor is a pointer that indicates a link”.

From "Buttons shouldn’t have a hand cursor" by Adam Silver

share|improve this answer
17  
Huh, that is pretty surprising to me I've always used hand pointers on pretty much anything clickable. I honestly don't see the benefit of making it only for links either, sure they need it to give them affordance but why should you detract from buttons. – DasBeasto yesterday
10  
Nowadays, button look a lot like text due to flat design paradigm so the affordance is not a relevant argument anymore. – Édouard Lopez yesterday
15  
@ÉdouardLopez Not quite. Unless your design is broken, there's still plenty of affordance even on flat buttons - for example, when you hover a mouse over them, they change background colour, add a border, expand... The original affordance a button provides was lost, but replaced with a different one. And since pointers became associated with links in particular, people expect them to open a browser, have a URL you can copy, open in a new tab in the browser, be safe (after all, links are supposed to be non-destructive), that kind of thing. – Luaan yesterday
5  
I don't agree with your snippet. The buttons on this very site use the hand-pointer, and I would consider it a design-mistake if they didn't. – BlueRaja - Danny Pflughoeft yesterday
4  
@8bittree: "Are you sure this site uses <button>s?" - That's irrelevant, this site is about UI, not HTML semantics. To the user, a button is a button. – BlueRaja - Danny Pflughoeft yesterday

According to W3C cursor:

pointer The cursor is a pointer that indicates a link.

The specification only indicates that links are meant to have the pointer cursor. Buttons are not meant to have the pointer cursor in the specification and probably that is the reason why Browsers don't assign it by default and we have to do it manually.

As to why would links need the pointer cursor, additionally to Dipak's answer, my understanding is that the specification considered it might not be obvious (in comparison with the surrounding text) that text links are links.

share|improve this answer
    
How's this any different from Dipak's answer? – Diego yesterday
2  
@Diego I think there are two questions: Why the HTML button element doesn't have the pointer predefined? Because the specification only indicates links. Why would only links need the pointer? I agree Dipak already commented on it, Ill edit to indicate it or should I remove the answer? – Alvaro yesterday
7  
@Diego yes. This answer quotes an official source. – tjati yesterday
4  
@Rob This does not state that <button> is a link. It states that the behavior in question is intended for <link>s and thus, by extension, not intended for <button>s, because they are not <link>s. – 8bittree yesterday
3  
This answer really gets to the heart of the question best. @Dipak's answer provides good information about why the default behavior should not be overridden. Alvaro, I would suggest editing this a little to drive home the point how that the default browser behaviors follows the official specification. – Tim Grant 16 hours ago

It's worth considering the historical order in which these things came into being.

Buttons existed from very early in the days of GUI computing. They had a shadowing effect to give a skeuomorphic impression of their being akin to physical buttons, which served to indicate they could be clicked much as one would push such a physical button. Indeed since you could be clicking a physical button on the mouse to do so (assuming you weren't tabbing on the keyboard to navigate), the skeuomorphism was backed up by that physical action.

When the cursor was over them they got the default cursor that indicated that while it may be possible to click or double-click whatever was under the cursor, they couldn't be typed in, and nor where they the dragging edge of a resizable object. Mostly the fact that they looked a bit like physical buttons sufficed to indicate that they were clickable.

When hypertext (of which the web isn't the first, but was the killer app that brought it to a wide audience) emerged the clickable bits of text were indicated through underlining and (when colour was available) different colours to the non-linked text. It was still relatively weak as a physical signal so the hand-shaped cursor was used as a further indication.

It was some time before <input> gave buttons when the type was submit or reset. Like the other types of <input> they were implemented through the mechanisms the OSs had for standard widgets and would have standard buttons. As the OSs put arrow cursors on such widgets, they had arrow cursors. That was fine as within the relatively limited range of features one could have in a web page at the time went, they were obviously buttons and obviously clickable. It would also be a bit weird to have anything other than normal OS behaviour at the time, since it would mean that web-browsers were acting strangely compared to other programs. If even many richly formatted applications (like games and some high-end office software which customised UI features beyond the OSs' standard) used arrows here, why wouldn't a relatively boring thing like a web page, which is just some black on grey text with some blue bits and maybe a few images floating to one side or the other?

When CSS made the presentation opportunities for web pages much richer (though they already had colour and font choices by now, albeit in horrid to code ways) buttons were still being rendered by calling into the OSs windowing system calls, so not affected by CSS. When CSS later made cursors one of the things that could be changed for an element, buttons weren't affected as they were outside of the scope of what CSS could change.

Browsers started drawing their own buttons so that CSS could change the appearance and also so they wouldn't "shine through" elements positioned "above" them in layered effects, but by now there was over a decade of the hand cursor being the normal cursor for a link and an arrow cursor being the normal cursor for a button. Even if one would argue now that buttons in browsers are no longer the same thing as buttons in other applications (which is a questionable argument still), consistency argues against such a change, particularly as the default; okay it would be technically easy to change it now, but it's technically easy for the page designer to change it now too, so why change the appearance of the pages of the people who haven't decided they want to change it?

share|improve this answer

First, <button> is not a link so any answers ascribing to what happens when you hover over a link don't apply. Second, CSS is a separate, independent specification from HTML. One does not specify what the other should do. It is the browser vendor that decides what CSS is provided for any actions in many cases though they tend to stick to the same thing if it's not in the specification.

It's been a long time since I've read this part of the spec and I'd have to review it for what is there but I'm pretty sure there is an indication nothing is to happen in this case because a button should be a button and if it's not a button it should be something else!

share|improve this answer
6  
Actually, links are very applicable here, because the specific behavior in question is supposed to be exclusive to links, according to Microsoft's design guide, Apple's design guide, and the W3 user interface guide. Since <button>s, as you point out, are not links, they should not default to having a behavior that only links are supposed to have. – 8bittree yesterday
    
@8bittree The question is asking about button behavior which is what I am addressing. Everyone else is addressing link behavior so they don't answer the question. – Rob yesterday
3  
I'm really having trouble understanding how "it is imperative not to use the hand pointer for other purposes. For example, command buttons already have strong affordance, so they don't need a hand pointer. The hand pointer must mean 'this target is a link' and nothing else" fails to answer the question. That even seems to agree with your statement that "a button should be a button". – 8bittree yesterday

- Used for most objects. - Used for text links.

Example of a mouse pointer

Hover cursor change in the animated picture to the right is an example of a mouse cursor moving around the screen as a pointed arrow, over text as an I-beam cursor, and then hovering over a link as a hand pointer.

Concluzion:

Mouse arrow is destined for selecting of most objects (like button)

Hand pointer is destined for selecting an object or text links

share|improve this answer
    
But the default mouse arrow is also used in white-space areas (margins etc), in other words, when the cursor is over nothing. Does that make for a consistent UI? – Mr Lister 16 hours ago
    
The demo would be better if it also showed a button with solid affordance. – Tim Grant 15 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.