[ButtonBase] Improve Button accessibility
See original GitHub issueRevert #10339 removed safeguard and add additional one so anchors missing href’s are treated as buttons.
- This is not a v0.x issue.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior 🤔
An anchor with an href should not be assigned role=button.
Current Behavior 😯
An anchor with prop button w/ href is being given role of button as it misleads users. A button does not alter the url path while an href does.
Steps to Reproduce 🕹
<ListItem component={Link} to={path} button>
Hi there
</ListItem>
Context 🔦
Screen reader
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:15 (12 by maintainers)
Top Results From Across the Web
[ButtonBase] Improve Button accessibility #15512 - GitHub
An anchor with prop button w/ href is being given role of button as it misleads users. A button does not alter the...
Read more >Building Accessible Buttons with ARIA: A11y Support Series
Continuing on with our series, we're going to build another accessible ARIA widget: a simple role=”button” UI control. Then we'll test what ...
Read more >ButtonBase API - Material UI - MUI
Name Type Default
action ref
centerRipple bool false
children node
Read more >Pass Accessibility Props to Material UI Button - Stack Overflow
How do I pass the additional props (accessKey, ariaLabel) into the Material UI Button. How do I do this? reactjs · button ·...
Read more >ARIA: button role - Accessibility - MDN Web Docs
The button role identifies an element as a button to assistive technology such as screen readers. A button is a widget used to...
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 Free
Top 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

Well then, thank you both for the feedback. I’ll try to get this in before the end of the week.
On Mon, Apr 29, 2019, 4:13 PM Olivier Tassinari notifications@github.com wrote:
@bluSCALE4 Any role explicitly specified by the user (including
nullorlink) will win without any additional logic. Arolespecified by the user will be part of...otherand...otherwill win over...buttonPropswhere any overlap occurs due to the order that they are spread onto the component:Here is a modification of the Third-party routing library demo showing this: https://codesandbox.io/s/xo31norvxq