Re: ISSUE-85 ARIA roles and button/links

>Shelley Powers said...
>
>
> Ajaxian has been one of HTML5's biggest fans, and yet Ajaxian points
> to a library that demonstrates using links as buttons--and does so
> without equivocation and without caveats to the effect of "One must
> not use links as button..." Of course not: JavaScript developers use
> any number of page elements as buttons, to suit the needs of our
> applications. We'll use list elements, divs, even headers as
> buttons--depending on the effect we want to create. The only time
> people demur is when they see bad code.

I've been one of those JavaScript developers that have used every possible
element as buttons in one way or another with my JS. I've scaled back to
using only anchor and button elements for buttons ever since I attended a
presentation by Derek Featherstone, who covered the topic quite
passionately. It's my understanding since then (correct me if I'm wrong)
that accessibility software makes it easy enough to target both links or
buttons.

>
> I can see a general acceptance for ARIA roles, over time, in order to
> facilitate accessibility. Especially since their addition won't
> require any changes to the code, and only minor changes to the markup.
> The use of the roles doesn't go against accepted practice. Telling
> people they can't use something like links as buttons, will.

Is there any reason (other than semantics) that it would be harmful for
someone to use a link as a button? Yes, semantically a button is a button,
and not a link, but if the accessibility software in existence already
makes both easily selectable, is there any noteworthy disadvantage to
using links instead?


> But throwing out warnings or errors
> based on using links as buttons won't change what is generally
> considered accepted practice. All the increased warnings and errors
> will do, is add noise, and generate distrust in the validators.

Agreed. At least, I imagine it'd be a steep uphill battle to get
JavaScript developers to scale back to only button elements as buttons.

Kyle Weems
Developer & Humorist
Mindfly Web Studio
http://cssquirrel.com/

Received on Wednesday, 18 November 2009 17:30:29 UTC