WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Actionable roles vs behaviors


From: Birkir R. Gunnarsson
Date: Jun 19, 2017 2:47PM

Oh no, you brought up the link vs. button (groan).

This is a never ending debate in the accessibility community. Two
idiots (well at least one of them is an idiot, yours truly) even had a
CSUN discussion panel dedicated to this very topic in fact:

Honestly, this is a fascinating subject, but I think it is one where
we get so lost in our accessibility induced geekyness we forget the
effects for the user are relatively minor (compared with a lot of
other issues).

And, you are right, I don't think there is any one right answer for this.

If there is disagreement between the element used to implement
something (e.g. a link) and the way it is presented visually (e.g.
link styled as a button), should we lie to the assistive technology
user as well (by using role="button") or create a mismatch between the
perception of the a.t. user and the regular user (which is also
difficult, e.g. for speech recognition users, or if a screen reader
user is working with a non-screen reader user trying to locate the
element on the page, the sighted user will describe the element as a
button, so the screen reader user will look for abutton.

I think we sometimes read too much into what the users think and the
interaction differences.

If you can't activate something with aspace bar, you try the enter key
(so a link styled as a button is focusable and will work with the
keyboard, only not with the spacebar).

A screen reader user will activate the element and see what happens
(incidentally, in browse mode, you can use either the spacebar or
enter key to trigger the onclick event on any link or button element,
the screen reader sends a synthetic onclick event to the element when
you press either, so to those users the keyboard activation
differences don't matter).

There are situations where the diffeences become important.

* If you have a "delete" button, you expect that pressing it will
execute the function (something will be deleted). If it is a "delete"
link, you expect to be taken to a page where you can select and delete
the information. Of course, if the info is important (financial,
legal, or info in database systems) you should get a warning and a
chance to back out or confirm the deletion regardless of the element
you used (see WCAG 3.3.4).

I try to file issues and force developers to use a visual appearance
consistent ith the element purpose. Then I ask themto either use the
correct semantic HTML element to match that appearance, oruse ARIA to
fake it.
If the appearance is wrong, I advocate the the assistive technology
expeience be wrong as well.
Then I file an issue saying the wrong element was used.

On 6/19/17, Lovely, Brian (CONT) < <EMAIL REMOVED> > wrote:
> Hey all,
> For purposes of screen reader users, I use the rule of thumb that if an
> actionable element performs an action on the current page it should be a
> button element, and if an actionable element directs the browser to another
> URL, it should be a link element. This is to be followed regardless of how
> the element is styled. If an element is styled as a button-like lozenge, but
> still directs the browser to another URL, it should be (or at least announce
> and behave as) a link.
> However, I was recently reminded of the fact that sighted users of software
> like Dragon Naturally Speaking, may see an element that looks like a button
> and expect to interact with it like they would a button.
> These seem like two irreconcilable views. Anyone have any suggestions on how
> to think about this issue?
> Brian Lovely
> Digital Accessibility Team
> >
> The information contained in this e-mail is confidential and/or proprietary
> to Capital One and/or its affiliates and may only be used solely in
> performance of work or services for Capital One. The information transmitted
> herewith is intended only for use by the individual or entity to which it is
> addressed. If the reader of this message is not the intended recipient, you
> are hereby notified that any review, retransmission, dissemination,
> distribution, copying or other use of, or taking of any action in reliance
> upon this information is strictly prohibited. If you have received this
> communication in error, please contact the sender and delete the material
> from your computer.
> > > > >

Work hard. Have fun. Make history.