W3C home > Mailing lists > Public > public-html@w3.org > October 2009

Re: ARIA roles added to the a element should be conforming in HTML5.

From: Nick Fitzsimons <nick@nickfitz.co.uk>
Date: Wed, 21 Oct 2009 15:45:14 +0100
Message-ID: <ad9d9dc0910210745t7711c7a2t37e7088e59fa8d08@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Shelley Powers <shelley.just@gmail.com>, Steven Faulkner <faulkner.steve@gmail.com>, Lars Gunther <gunther@keryx.se>, HTMLWG WG <public-html@w3.org>, W3C WAI-XTECH <wai-xtech@w3.org>
2009/10/21 Tab Atkins Jr. <jackalmage@gmail.com>:
> Sometimes making a link into a button seems to be the correct choice.
> If I want the styling of a button, but I want clicking it to just
> navigate you to another page, I can restyle an <a> to look like a
> button, or I can insert a <form action><button type=submit></></> and
> style the form away.  The latter feels like a dirty hack.  (I've used
> it, once, but only at the very very beginning of my webdev career when
> I didn't fully understand how urls and query params interacted.)
>

In that case you are visually styling a link to resemble a button, but
its functionality is still that of a link, so it would be incorrect to
give it a role of "button": the role describes what something does,
not what it looks like.

Similarly, if I were to lose my mind and produce something like:

<button type="button"
onclick="self.location.href='http://example.com/'">Go to
example.com</button>

then it would be appropriate for me to give the button an ARIA role of
"link", as it is acting like a link and not a button.

Regards,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/
Received on Wednesday, 21 October 2009 14:45:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:50 GMT