- From: Nick Fitzsimons <nick@nickfitz.co.uk>
- Date: Wed, 21 Oct 2009 15:45:14 +0100
- 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:49 UTC