News for hackers. Stuff that matters.
Re:Why using anchors as buttons sucks by tikhonj on Sunday February 05, 2012 @04:40AM (#3553722)
Actual buttons annoy me. I like navigating around using just the keyboard, so a lot of the time I just do a search for the link I want to click (ctrl-f on Chrome or ' on Firefox) then just use enter to click the link. This works great when the button is actually just a styled link, but does not work at all with an actual button.

Of course, I'm indubitably in a tiny minority, but it's still something to note.

Re:Why using anchors as buttons sucks by spauka on Sunday February 05, 2012 @05:08AM (#3553760)
On a similar note to this, I generally like to open links in new tabs, so that I can refer back to the original page without losing my place, or to refer to the linked content after I finish on the current page. This does not work when you are using styled buttons, or pages which rely heavily on JS/AJAX to do their thing. Inevitably in this case, I must navigate away from the original page, look at the content and then use back, hoping that I return to the correct location.

Notable examples of this include the Facebook "Show more comments" link, g-mail's email links and "Add to Cart" buttons which redirect away from the product page.

Re:Why using anchors as buttons sucks by rplnt on Sunday February 05, 2012 @06:05AM (#3553818)
I too use search and enter to navigate quite often. But I also use middle mouse button to open targets in background. This doesn't work when there is no target. And I think every link should have an target. So buttons are all right if they just modify the content of the page. Buttons for opening new pages are bad. Anchors opening new pages (usually sized pop-ups) just by javascript, having no real target are horrible and I want to punch someone responsible every time I see something like that.

Funny enough, the google plus linked above is horrible at this.

Re:Why using anchors as buttons sucks by jasonlotito on Sunday February 05, 2012 @10:46AM (#3554298)
Okay, but buttons are intended to do something, not for navigation. If someone is using a button to send you somewhere, they are doing it wrong. That's what anchor tags are for. Basically, buttons imply an action where as anchor tags imply navigation. If you are running into people using buttons as navigation, it's not the buttons fault!
Re:Why using anchors as buttons sucks by tikhonj on Sunday February 05, 2012 @04:45PM (#3555352)
By "navigating" I don't mean just moving from page to page but rather interacting with the particular page. So even if your button only does something on the current page, I would like it to be a link so that I don't have to click on it.
Re:Why using anchors as buttons sucks by jasonlotito on Monday February 06, 2012 @08:27AM (#3557298)
> if your button only does something on the current page

That doesn't make any sense. First, the current page doesn't matter. Secondly, "doing something" doesn't define what "something" is. Finally, your complaint is having to click on the button, implying that you have to click on a button to activate it.

Sorry, your just being very confusing, using words and terminology you don't seem to be familiar with.

Re:Why using anchors as buttons sucks by tikhonj on Monday February 06, 2012 @10:24AM (#3557676)
Perhaps my wording was not entirely clear--what I meant was, regardless of what the button does, I want to activate it without tabbing or clicking, just using search. This works well with anchor tags, but does not work with buttons.

I meant navigating in the sense of moving the viewport and mouse around a static page rather than moving from page to page.

Re:Why using anchors as buttons sucks by tkazec on Sunday February 05, 2012 @06:56AM (#3553883)
Great point, I hadn't thought of that. Buttons are so finicky :(

On a related note, I wonder how screenreaders handle buttons? I'm guessing/hope they read the labels, but if they don't...

Re:Why using anchors as buttons sucks by mason-l on Sunday February 05, 2012 @06:25AM (#3553845)
Link hinting and following scripts in many vim-like browsers allow you to click or focus buttons by an index or the button text. Example in luakit: http://i.imgur.com/qTOPz.png
Re:Why using anchors as buttons sucks by irahul on Sunday February 05, 2012 @05:01AM (#3553752)
Try any of the vim keybinding plugins if you like keyboard navigation. I use vimium with Chrome.