WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Links and Spacebar

for

From: Marshall Sunnes
Date: Feb 3, 2020 12:16PM


Thanks for the input! Case-by-case will have to be the recommendation.

Best,
Marshall

On Mon, Feb 3, 2020 at 12:59 PM Birkir R. Gunnarsson <
<EMAIL REMOVED> > wrote:

> Agree with Steve
> If you repurpose a link as a button you need Javascript that checks if
> the spacebar is pressed and executes the onclick event on the link if
> it is pressed.
> You can tie the Javascript selectors to all elements with
> role="button" (something you have to add to links anyway when you
> repurpose them as buttons).
> Note: A screen reader user doesn't care, because most screen readers
> are configured to execute the onclick event if either the enter or
> spacebar are pressed when in browse mode (this can be changed in
> screen reader settings and this does not apply in application/forms
> mode).
> I'm not implying you are only asking with the screen reader usre
> experience in mind (accessibility is about a lot more than screen
> reader users, as we all know and agree) but this behavior is specific
> to screen readers and people testing webpages for keyboarde
> accessibility often fall into the trap of having screen readers
> running when they do it.
> gives a confusing
>
> On 2/3/20, Steve Green < <EMAIL REMOVED> > wrote:
> > On all Windows browsers (and maybe Mac, but I have not checked), the
> > spacebar scrolls the page down unless the focus is on certain elements
> such
> > as checkboxes and buttons. That said, I have never seen anyone do this
> in 15
> > years of user testing.
> >
> > If all links responded to the spacebar I don't think anyone would notice.
> > Nevertheless, I am not keen on making exceptions like this, so I would
> > advocate against it. It should be easy to only have the spacebar work
> with
> > links that are styled as buttons.
> >
> > Steve Green
> > Managing Director
> > Test Partners Ltd
> >
> >
> > -----Original Message-----
> > From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of
> > Marshall Sunnes
> > Sent: 03 February 2020 16:32
> > To: WebAIM Discussion List < <EMAIL REMOVED> >
> > Subject: [WebAIM] Links and Spacebar
> >
> > *Question*: Is it problematic to allow activation of links with the
> > Spacebar, in addition to Enter?
> >
> > *More information*: The basic issue I find is that if a user sees
> something
> > that looks like a button, then it should work with the spacebar for
> > keyboard-only users.
> > If an app were to correctly identify elements as link or button based on
> the
> > description listed in the ARIA Authoring Practices 1.1
> > <
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.w3.org_TR_wai-2Daria-2Dpractices-2D1.1_-23link&d=DwICAg&c=slrrB7dE8n7gBJbeO0g-IQ&r=cXj9zeYcj_L9F2wRWNJV-Q&m=Ssq1MK1usGUWaopvn8cQTjiR70A5S-WMdJbVPsbrUDg&s=hzRDM8-kAQiT6NMnCGF2GkDey6J0X93E49ODFzUHCjs&e=
> >, but visually styled
> > links to look like buttons, then would it be an easy compromise to
> request
> > they simply make all links able to activated with spacebar? Does that
> > interfere with any known AT or user experience? Or is that misguided, and
> > the dev teams need to handle links that look like buttons on a
> case-by-case
> > basis?
> >
> > Best,
> > Marshall
> >
> > --
> > *Marshall Sunnes*
> > *Senior Digital Accessibility Specialist* NYU IT
> > <https://www.nyu.edu/life/information-technology.html>
> > New York University
> > Phone: (212) 998 4417 <+12129984417>
> > Email: <EMAIL REMOVED>
> > > > > https://urldefense.proofpoint.com/v2/url?u=http-3A__list.webaim.org_&d=DwICAg&c=slrrB7dE8n7gBJbeO0g-IQ&r=cXj9zeYcj_L9F2wRWNJV-Q&m=Ssq1MK1usGUWaopvn8cQTjiR70A5S-WMdJbVPsbrUDg&s=y-ndqpauJsR5sVaMmCYDoCKqBdRdxvsNqV0gSZkgmNk&e=
> List archives at
> >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__webaim.org_discussion_archives&d=DwICAg&c=slrrB7dE8n7gBJbeO0g-IQ&r=cXj9zeYcj_L9F2wRWNJV-Q&m=Ssq1MK1usGUWaopvn8cQTjiR70A5S-WMdJbVPsbrUDg&s=XMoxlaA12v2bUx9BcVM0ulLDvgZcCxg85-6zn63pDsA&e=
> > > > > > > https://urldefense.proofpoint.com/v2/url?u=http-3A__list.webaim.org_&d=DwICAg&c=slrrB7dE8n7gBJbeO0g-IQ&r=cXj9zeYcj_L9F2wRWNJV-Q&m=Ssq1MK1usGUWaopvn8cQTjiR70A5S-WMdJbVPsbrUDg&s=y-ndqpauJsR5sVaMmCYDoCKqBdRdxvsNqV0gSZkgmNk&e=
> > List archives at
> https://urldefense.proofpoint.com/v2/url?u=http-3A__webaim.org_discussion_archives&d=DwICAg&c=slrrB7dE8n7gBJbeO0g-IQ&r=cXj9zeYcj_L9F2wRWNJV-Q&m=Ssq1MK1usGUWaopvn8cQTjiR70A5S-WMdJbVPsbrUDg&s=XMoxlaA12v2bUx9BcVM0ulLDvgZcCxg85-6zn63pDsA&e=
> > > >
>
>
> --
> Work hard. Have fun. Make history.
> > > https://urldefense.proofpoint.com/v2/url?u=http-3A__list.webaim.org_&d=DwICAg&c=slrrB7dE8n7gBJbeO0g-IQ&r=cXj9zeYcj_L9F2wRWNJV-Q&m=Ssq1MK1usGUWaopvn8cQTjiR70A5S-WMdJbVPsbrUDg&s=y-ndqpauJsR5sVaMmCYDoCKqBdRdxvsNqV0gSZkgmNk&e=
> List archives at
> https://urldefense.proofpoint.com/v2/url?u=http-3A__webaim.org_discussion_archives&d=DwICAg&c=slrrB7dE8n7gBJbeO0g-IQ&r=cXj9zeYcj_L9F2wRWNJV-Q&m=Ssq1MK1usGUWaopvn8cQTjiR70A5S-WMdJbVPsbrUDg&s=XMoxlaA12v2bUx9BcVM0ulLDvgZcCxg85-6zn63pDsA&e=
> >


--
*Marshall Sunnes*
*Senior Digital Accessibility Specialist*
NYU IT <https://www.nyu.edu/life/information-technology.html>
New York University
Phone: (212) 998 4417 <+12129984417>
Email: <EMAIL REMOVED>