[Bug]: Tab with a 'href' will still navigate even if 'disabled' is true
See original GitHub issueBrowser
Chrome
Package version
v3.0.111
React version
v18.2.0
Description
When using the <Tabs>
component, if I have a tab that is set to disabled, but also has a href, then clicking on the tab will still navigate to the href.
Source code
No response
Reproduction
https://codesandbox.io/s/sleepy-fog-j3d22t
Code of Conduct
- I agree to follow this project’s Code of Conduct
- I checked the current issues for duplicate problems
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Disabled href tag - javascript - Stack Overflow
There is no disabled attribute for hyperlinks. If you don't want something to be linked then you'll need to remove the <a> tag...
Read more >How to Disable Links | CSS-Tricks
We need to describe this link as being disabled. The disabled attribute is not valid on links, but we can use aria-disabled="true" ....
Read more >Control focus with tabindex - web.dev
Using a tabindex greater than 0 is considered an anti-pattern because screen readers navigate the page in DOM order, not tab order.
Read more >aria-disabled - Accessibility - MDN Web Docs
The aria-disabled state indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
Read more >Navs and tabs · Bootstrap v5.1
As always, vertical navigation is possible without <ul> s, too. Active Link Link Disabled. Copy. <nav class=" ...
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
Fixed in v3.0.127
I’m re-opening this ticket because the fix has not yet been released on NPM.