# Designing Accessible Map and List Interfaces

A traveler opens a map of nearby sights, tabs past two zoom controls, and still cannot choose a place. The map works with a mouse, but the list fails to expose the same result-selection task. A map-based itinerary gives us a useful context to design around. The interface below is an illustrative example. [Tripmap itinerary planner](https://tripmap.vn/en/my-trips)

## Give the list the same place-selection task

Expose each result in a real list. Use a link for opening a detail page and a button for an action such as selecting a result on the map. Include enough context in the row to distinguish similar names, such as a neighborhood and a category. The list should let someone find a place, open its details, and return to the results using the keyboard. [WCAG guidance on keyboard access](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html)

If searching by visible area is central to the product, also provide a way to choose an area without dragging the map. A labeled neighborhood selector or named pan and zoom controls can make that task available to more people. Use a consistent visual highlight when a place is selected in either view.

## Keep focus stable when results update

When someone activates **Search this area**, keep focus on the control as long as it remains available. Update the list, show the new count visibly, and announce the count through a status region already present in the DOM. This lets screen reader users hear that the results changed without having their focus moved to the first item. [WCAG guidance on status messages](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html)

```html
<section aria-labelledby="places-heading">
  <h2 id="places-heading">Places in this area</h2>
  <button type="button" id="search-area">Search this area</button>
  <p role="status" id="places-status"></p>
  <ul id="places-list"></ul>
</section>
```

After a successful refresh, replace the list items and set the status text to something like “8 places in this area.” Use a concise message when a search comes back empty. If you close a modal details view, return focus to the control that opened it where possible, or to a nearby results control if that item disappeared.

## Test the task from start to finish

1. Use only the keyboard to set an area, find a place, open its details, and get back to the list.
2. Refresh results while focus is on the search button. Confirm that the focus stays visible and the new result count is announced once.
3. Repeat with a screen reader and an empty result set. Check that the next available action is clear.
4. Select a result from the list and from the map. Both actions should refer to the same place.

Test the whole sequence as a traveler would use it. A page can pass a markup check and still make it hard to recover your place after an update.
