What Should Be Avoided
In a navigation menu, dropdown menus are hidden using CSS. No script is provided for keyboard users to open the dropdown menu. As a result, users navigating with a keyboard will miss the elements within the dropdown. Sighted users can open the dropdown menu by mouse click or hover, but this functionality is not accessible to keyboard users. HTML Example (Incorrect implementation):
HTML/CSS
<section class="animal-entry"> <h2>Amazing Animals</h2> <img src="images/seahorse.jpg" alt="Image of a seahorse"> <p>The seahorse, a fascinating marine creature, is known for its unique body shape and ability to camouflage itself with its surroundings. These gentle fish are monogamous and the males carry the fertilized eggs until they hatch.</p> <p><a href="seahorse-details.html">More Info...</a></p> </section>
Explanation:The link does not have any preceding or following text and is not nested within a paragraph to explain the context of the link. Sighted users may infer it by reading the <h2> or the preceding paragraph in full. However, for screen-reader users, landing only on the link, it could come across as ambiguous.