question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Button as a Link accessibility

See original GitHub issue

<Button href="/">My Link</Button> will look like a button but render an <a> tag.

This pen demonstrates how the interactions are different:

https://codepen.io/tonileigh303/pen/LrVbmK

A link doesn’t respond to a space bar so using it as the tag under something that looks like a button is an accessibility issue.

There’s also some further stuff about how links should navigate and buttons should cause events, so some UX input here might be good to make sure we’re not facilitating unexpected accessibility issues with our design.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
tempertempercommented, Jan 29, 2021

All sounds good. Happy to review the component once done, or at any point along the line if you like, @sjohnson-sage 👍

0reactions
carboncicommented, Feb 5, 2021

🎉 This issue has been resolved in version 64.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Buttons & Links | Accessibility Guidelines
Screen readers handle links slightly differently than they do buttons. All links and buttons are tab-able, but pressing the Space key or Enter...
Read more >
Links and buttons on websites – Accessible Technology
Links take the user to a new location, such as a new web page or new section of the current page. · Buttons...
Read more >
Button versus Link | Introduction to Accessibility - A11y-101
A link is focusable and can be triggered by the enter key. A link will redirect you to a new page or a...
Read more >
Accessibility Buttons and Links - W3Schools
Both a link and a button are accessible for people relying on keyboard-only navigation; it can be clickable with both mouse and keys,...
Read more >
Links vs Buttons and Do's & Don'ts for Accessibility - Naga
Summary: links go places, buttons do things. Using the right element for the job is not just about doing the right thing for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found