Skip to content
easeweb
Search topics

Menu-only sites with no search or site map

A shop's only way to its products is a menu of categories, so anyone who can't guess which category holds an item has nowhere else to look.

WCAG 2.2
SC 2.4.5AA
Required by
Section 508 · EN 301 549 (EU)
Broken
The accessibility problem illustrated: Cognitive:Which one has the napkins?
01

The problem

People who can't guess which menu category holds what they want have no other way to find it

02

Try it

Find the shop’s linen napkins

On the broken side, the menu under Shop is the only way in.

Apply a fix to add a search box, a site map in the footer, or links from one product to the next, and find the napkins again.

Broken Can you fix this?

BrokenA menu and nothing else

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Give every page a second way in besides the menu

Before
BrokenA menu and nothing else
<header class="site-header">  <a href="/" class="logo">Fernhill</a>  <nav aria-label="Main">    <ul>      <li>        <button type="button" aria-expanded="false"          aria-controls="menu-shop">Shop</button>        <ul id="menu-shop" hidden>          <li><a href="/shop/kitchen">Kitchen</a></li>          <li><a href="/shop/table">Table</a></li>          <li><a href="/shop/bath">Bath</a></li>          <li><a href="/shop/bedroom">Bedroom</a></li>        </ul>      </li>      <li><a href="/sale">Sale</a></li>      <li><a href="/journal">Journal</a></li>      <li><a href="/about">About</a></li>    </ul>  </nav>  <a href="/basket">Basket</a></header>…<footer>  <a href="/delivery">Delivery</a>  <a href="/returns">Returns</a>  <a href="/contact">Contact us</a></footer>
What is wrong2 points

The menu itself is well built. What goes wrong is everything around it.

  • Someone who can't find a page in the menu has nowhere else to look. The menu is the only way to any page.
  • Someone who doesn't know that the shop files napkins under Table can only open each category in turn until they find them.
After

A site search in the header

<header class="site-header">  <a href="/" class="logo">Fernhill</a>  <nav aria-label="Main">    …  </nav>  <search class="site-search">    <form action="/search" method="get">      <label for="site-search">Search the shop</label>      <input id="site-search" name="q" type="search">      <button type="submit">Search</button>    </form>  </search>  <a href="/basket">Basket</a></header>
How it is fixed2 steps
  1. Put a search form in the shared header, so it is on every page in the same place.
  2. Wrap it in the search element, which makes it a search landmark that screen reader users can jump to.

With the menu, it gives every page two ways in, so this fixes the Before and passes 2.4.5. It works only as far as the results do: it has to find every product, category, care guide and policy page by its title, and by the words visitors use for it.

04

Verify the fix

4 checks, no mouse.

Test with: Keyboard, Screen reader

0 of 4 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after any change to the menu, the search index or the site's sections.

How screen readers handle aria-expanded

Limits

This is a starting pattern, not a guarantee for every site. 2.4.5 asks for more than one way, not for good ones: a search that finds nothing useful technically passes, and still fails the people it is for. Steps in a process, such as checkout, are exempt, so don't put a search into the payment step to satisfy it. Test the whole site with the people who will use it, especially people who find menus hard.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service