Accessibility Breakdown | Navigating Landmarks
Tags: a11y, accessibilityadvocate, webdev, developers
Published: 2024-05-29 17:00:00

Todays mini series of things you can do <mark>**right now**</mark>, is on navigating landmark accessibility. Landmarks are often overlooked but are crucial for inclusive browsing. We want everyone to navigate the digital landscape seamlessly. Let's get into it: 

---

## Why it Matters:

- **Accessibility Impact**: For individuals with disabilities, landmarks offer vital orientation within a webpage, empowering them to navigate independently and access content efficiently.
- **User Experience**: Landmarks provide essential cues, guiding users through webpage structures and improving navigation efficiency. Consider landmarks as road signs on a highway. Without them, one would struggle to navigate and reach their destinations efficiently. 

---

## Quick Check:

- **Manual Inspection**: Scan your web pages for semantic HTML elements such as `<header>`, `<footer>`, `<nav>`, `<main>`, `<aside>`, and `<section>` to identify existing landmarks. 

  - Does all content exist inside a landmark? Look for supporting ARIA roles if landmarks aren't there. 

  - Avoid duplicate landmarks with the same role in the same context. For example, having two <main> tags on the same page can confuse screen reader users.

  - For pages with dynamic content (e.g., single-page applications), ensure that landmarks are updated dynamically as the content changes. This helps screen readers keep up with the context shifts.
  
  - You can use browser developer tools like Chrome DevTools to inspect the accessibility tree. 

  - You can use also use [Web Developer](https://chromewebstore.google.com/detail/web-developer/bfbameneiokkgbdmiekhjnmfkcnldhhm) to help point these out.

  ![Image of web developer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2pubipq81tes2i6a8d8.png)
<figcaption>Web Developer tools</figcaption>


- **Automated Tools**: Utilize accessibility evaluation tools like [Lighthouse](https://developer.chrome.com/docs/lighthouse) or [Axe](https://chromewebstore.google.com/detail/axe-devtools-web-accessib/lhdoppojpmngadmnindnejefpokejbdd?utm_source=deque.com&utm_medium=referral&utm_campaign=axe_hero) or [WAVE](https://chromewebstore.google.com/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh) to validate the presence and proper usage of landmarks automatically. You might see an error like this:

  ![landmark axe error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pgg5d4w5t11zlvxlg1sv.png)

- **Screen Reader Testing**: Test your web pages using a screen reader to ensure that landmarks are conveyed effectively to users who rely on auditory feedback. Can you understand each section of the page?

---

## Quick Fixes:

- **Semantic Markup**: Ensure accurate use of semantic HTML elements to define landmarks. Utilize appropriate tags to delineate content sections. For example:

  - `<header>`: Contains introductory content, such as a website's title and navigation links.
  - `<main>`: Contains the main content of the webpage.
  - `<section>`: Groups related content together within the main section.
  - `<footer>`: Contains footer information, such as copyright details.

  Use what works for you.

- Maintain consistency in landmark usage across different pages of the site. This provides a predictable experience for users.

- **ARIA Landmarks**: Supplement semantic HTML with ARIA landmarks for enhanced accessibility. Utilize roles like `role="banner"`, `role="navigation"`, `role="main"`, and `role="complementary"` to provide additional context.

- Use aria-label or aria-labelledby attributes to provide descriptive labels for landmarks when necessary

```html
<nav aria-label="Primary Navigation">
  ...
</nav>
```

---

## Testing:

- Ensure that focus management practices (e.g., tabindex, focus trapping) do not interfere with landmark navigation.
- Test landmark functionality across different browsers and devices to ensure consistent behavior

- Consider conducting user testing sessions with individuals who might use assistive technologies, or someone who isn't familiar with your app to gather feedback on the accessibility of landmarks and implement necessary adjustments that make sense.

By following these quick steps, you can quickly enhance the accessibility of how you utilize landmarks in your application, contributing to a more inclusive online environment for all users. Accessibility is an ongoing journey, so start making a positive impact today!🌟

---

**Helpful Links** 
Free <abbr title="Accessibility">A11y</abbr> tools:

- [NVDA Screen Reader](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwj7uqDNm_D6AhUiEFkFHfvrB9QQFnoECBYQAQ&url=https%3A%2F%2Fwww.nvaccess.org%2Fdownload%2F&usg=AOvVaw3AAc5nrFrg0lylpULGjjxr)
- [Axe DevTools Chrome Extension](https://chromewebstore.google.com/detail/axe-devtools-web-accessib/lhdoppojpmngadmnindnejefpokejbdd)
- [WAVE Browser Chrome Extension](https://wave.webaim.org/extension/)
- [Web Developer Chrome Extension](https://chromewebstore.google.com/detail/web-developer/bfbameneiokkgbdmiekhjnmfkcnldhhm)
- [ANDI Accessibility Testing Tool](https://www.ssa.gov/accessibility/andi/help/install.html)

A11y Info:

- [WCAG Standard Guidelines](https://www.w3.org/WAI/standards-guidelines/wcag/)
- [A11y Project](https://www.a11yproject.com/)