[docs] missing role="link" for Button with Link
See original GitHub issueUsing the documented way of creating links styled as buttons as seen in https://next.material-ui.com/guides/routing/#button adds wrong role on the rendered element. Specifically it adds role="button"
making the link undiscoverable from google crawlers. I would at least hope that it was documented that I have to manually type role="link"
to make links discoverable.
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
Using <Button component={RouterLink} to="/">
I get an <a href="/" role="button">
rendered.
The assigned accessibility role is “button”
Expected Behavior 🤔
Using <Button component={RouterLink} to="/">
I expect to have an accessibility role of “link”
Steps to Reproduce 🕹
Steps:
- Go to https://next.material-ui.com/guides/routing/#button
- Inspect the rendered
<a>
and observe an incorrect role attribute
Your Environment 🌎
v5.0.0-alpha.34 react-router-dom v6 beta.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:10 (7 by maintainers)
Top Results From Across the Web
[docs] missing role="link" for Button with Link · Issue #26453
Specifically it adds role="button" making the link undiscoverable from google crawlers. I would at least hope that it was documented that I have ......
Read more >Google form only showing a Get Link button
When I test the form by clicking on its link in a web page, it only shows the Get Link button. I've filled...
Read more >Documentation – Circuit Happy, LLC
Press the Play button on The Missing Link to start the clock. For Syncing with MIDI Devices. The Missing Link supports sending MIDI...
Read more >SharePoint Online button webpart with link to document not ...
Hi,. We have different pages that contain a default "button webpart" which has a link to a document in a library on SharePoint...
Read more >"+ Add Document" link missing for some users
@BennySkogberg: When I give Contribute permissions to the user on the designated folder, the "Add Documents" link is still not showing. Is there ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@shadab14meb346 All good from my end 👍
@shadab14meb346 For the change in the documentation, I think that it’s a good initiative, but we likely want to keep it straight:
@itsUndefined I think that we have to change the documentation, as our least worse option. We can’t know if the component is used to render a button or a link. Not adding a role button would be even worse for when developers render a
div
.