WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Is a button that does not support space bar activationa violation of WCAG?

for

From: Paul J. Adam
Date: May 6, 2015 8:32PM


I used to think and say that if it looked like a button visually then it should have role=button since most people would refer to it as a button in a conversation.

However, humans and designers all have very different opinions on what button or a link really looks like. On iOS now buttons look like blue links without an underline. Thanks to the flat design trends buttons don't really look like buttons any longer.

I'm also thinking that a screen reader user does not care what the UI element they're focused on looks like so it's best to set the role based on the functionality of the element rather than the look. Native mobile makes this more apparent. So elements that open external URLs should likely be a link role even if they look like a button and elements that function like expanding/collapsing widgets should likely be a button role rather than a link role even if they look like a typical link.

So eliminating the "if it looks like a" from the discussion makes determining the proper role much easier.

Paul J. Adam
Accessibility Evangelist
www.deque.com <http://www.deque.com/>;
> On May 6, 2015, at 9:12 PM, Jonathan Avila < <EMAIL REMOVED> > wrote:
>
>> Things I'd consider a fail would be using an ARIA role that implies spacebar, arrow key, or escape key behavior without actually implementing that behavior. Seems like a 4.1.2 failure, i.e. you are using the incorrect role for this element since the behavior does not match the standard native element.
>
> Then you might also say if something looks like a button but is implemented with a link then it's also a failure. These are all good discussions -- but we would really need consensus and then corresponding WCAG failure techniques to assist the wider community in determining conformance.
>
> Jonathan
>
> --
> Jonathan Avila
> Chief Accessibility Officer
> SSB BART Group
> <EMAIL REMOVED>
>
> 703-637-8957 (o)
> Follow us: Facebook | Twitter | LinkedIn | Blog | Newsletter
>
>
>