News Homepage Using HTML5 , CSS3 , JavaScript and Bootstrap5
Design comparison
Solution retrospective
Hello everyone, I hope that you are doing great. I am back to solve some challenges and I enjoyed this one. If someone have any advice on how I can improve, please comment this challenge. Thank you in advance!
Community feedback
- @dusan-bPosted about 2 years ago
Hey Milos,
I like your solution and the correctly applied HTML structure.
To improve accessibility, though, you should avoid using the
<div>
element for semantic elements, such as buttons. To make the menu button accessible for keyboard and screen reader users, you should use the<button>
element instead .In addition, the alternative text of the menu icon should describe the purpose of the menu button, i.e. something like "main menu" would be more precise, as screen readers would then read the button as "main menu, button".
You should also place the menu button right after the opening
<nav>
tag so that users can recognise it more easily.Here's a simplified example:
<nav> <button> <img src="" alt="main menu"> </button> <ul> ... </ul> </nav>
The rest looks pretty good. Keep going, and happy coding. :)
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord