Buttons for navigation should be anchors [A11y][Good First Issue]
See original GitHub issueCurrently the navigation uses buttons to activate the navigation.
As these affect navigation they should be actual links (anchors) for accessibility.
SUggested
Change from:
<button class="px-4 py-2 font-bold text-black bg-white rounded hov-bg-theme">4C</button>
To:
<a href="https://www.4c.rocks/" class="px-4 py-2 font-bold text-black bg-white rounded hov-bg-theme">4C</a>
Repeat adding relevant hyperlinks for each menu item.
Bonus points
You should wrap the anchors in <li>
to ease navigation for screen reader users (as it states how many items there are in the list so they know how large the menu is).
Markup outline:
<nav>
<ul> <!-- replace the current div here with the <ul>
<li><a href="ref">text</a></li>
<li><a href="ref">text</a></li>
<li><a href="ref">text</a></li>
<li><a href="ref">text</a></li>
</ul>
<nav>
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Buttons in nav instead of anchor? [duplicate] - Stack Overflow
I've been reading up on web accessibility and read that anchor tags should only be used when the user will be taken to...
Read more >Anchors, Buttons, and Accessibility - Formidable Labs
(While anchors can act as placeholder links or target link destinations, ... Pressing the enter key should navigate to the URL of the...
Read more >Anchors vs Buttons - bitsofcode
When navigating with a keyboard, the anchor element can be “clicked” by pressing the enter key. To screen readers, when an anchor tag...
Read more >Button vs. Anchor - Twilio Paste
From a high level, buttons are to be used for performing an in-page action and anchors/links are for navigating to a new page....
Read more >v2 add NavAnchor and NavButton · Issue #2216 · grommet ...
To put it another way, I was thinking a control being used for navigation, like in a sidebar, would use Button, not Anchor....
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
hi @FrancescoXX , I would like to work on this issue. Can you assign me?
Fixed by #390