Web Accessibility Cookbook

Book description

Frontend developers have to consider many things: browser compatibility, usability, performance, scalability, SEO, and other best practices. But the most fundamental aspect of creating websites is one that often falls short: accessibility. Accessibility is the cornerstone of any website, and if a website is inaccessible, users won't be able to interact with it, obtain information, sign up for services, or buy products.

The Web Accessibility Cookbook provides you with dozens of recipes to help you avoid these failures. You'll learn how to build common components, such as main navigation, filters, and dialogs, in an accessible manner. Each recipe not only explains how to build things but also why. Author Manuel Matuzovic provides the knowledge you need to create your own accessible components and address your users' varying needs, abilities, and preferences.

With this practical guide, you will:

  • Learn how to build websites that feature inclusive frontends
  • Discover the common obstacles website users face every day
  • Understand how your decisions impact users
  • Learn how to build accessible frontends step-by-step
  • Write high-quality markup and CSS
  • Evaluate the accessibility of frontend components

Publisher resources

View/Submit Errata

Table of contents

  1. Foreword
  2. Preface
    1. Who This Book Is For
    2. What’s in this book/Organization
    3. Code examples and supported software
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
  3. 1. Structuring Documents
    1. 1.1. Define the natural language
    2. 1.2. Describe the document
    3. 1.3. Set the viewport width
    4. 1.4. Optimize rendering order
    5. 1.5. Structure the document
  4. 2. Structuring Pages
    1. 2.1. Create navigation landmarks
    2. 2.2. Create form landmarks
    3. 2.3. Label landmarks
    4. 2.4. Structure the main content
    5. 2.5. Create a sound document outline
    6. 2.6. Present content in order
  5. 3. Linking Content
    1. 3.1. Pick the right element
    2. 3.2. Style links
    3. 3.3. Create download links
    4. 3.4. Create email links
    5. 3.5. Link images
    6. 3.6. Inform users of changing context
    7. 3.7. Fix client-side rendering
    8. 3.8. Add links to groups of elements
  6. 4. Performing Actions
    1. 4.1. Pick the right element
    2. 4.2. Label buttons clearly
    3. 4.3. Remove default button styles
    4. 4.4. Add states and properties
    5. 4.5. Don’t disable buttons
  7. 5. Styling content
    1. 5.1. Work with color
    2. 5.2. Respect user preferences
    3. 5.3. Work with units and sizes
    4. 5.4. Preserve semantic information and operability
    5. 5.5. Add motion and animation
  8. 6. Managing Focus
    1. 6.1. Provide focus styles
    2. 6.2. Make elements focusable
    3. 6.3. Move focus
    4. 6.4. Keep focus contained
    5. 6.5. Preserve order
    6. 6.6. Allow users to skip elements
  9. 7. Navigating Sites
    1. 7.1. Create a Main Navigation
    2. 7.2. Highlight the active page
    3. 7.3. Announce the number of items
    4. 7.4. Provide quick access
    5. 7.5. Hide the navigation on narrow viewports
    6. 7.6. Add a slide-in animation
    7. 7.7. Add sub menus
    8. 7.8. Avoid confusion with menus
  10. 8. Toggling Content Visibility
    1. 8.1. Hide content
    2. 8.2. Create a native disclosure widget
    3. 8.3. Create a custom disclosure widget
    4. 8.4. Create groups of disclosure widgets
  11. 9. Constructing Forms
    1. 9.1. Create forms
    2. 9.2. Identify form elements
    3. 9.3. Describe form fields
    4. 9.4. Highlight erroneous fields
    5. 9.5. Group fields in a form
    6. 9.6. Split forms into steps
  12. 10. Filtering Data
    1. 10.1. Create a form
    2. 10.2. Filter the data
    3. 10.3. Paginate results
    4. 10.4. Sort and display results
    5. 10.5. Group filters
  13. 11. Presenting Tabular Data
    1. 11.1. Pick the right elements
    2. 11.2. Structure tables
    3. 11.3. Add interactive elements
    4. 11.4. Sort columns
  14. 12. Creating custom elements
    1. 12.1. Working with IDs
    2. 12.2. Creating ARIA references
    3. 12.3. Focus elements in Shadow DOM
    4. 12.4. Debugging and testing
    5. 12.5. Enforce best practices
  15. 13. Debugging Barriers
    1. 13.1. Find accessibility issues automatically
    2. 13.2. Explore the accessibility tree
    3. 13.3. Debug roles, names, properties, and states
    4. 13.4. Visualize tabbing order
    5. 13.5. Emulate color deficiencies, reduced motion, and more
    6. 13.6. Write custom debugging rules
  16. About the Author

Product information

  • Title: Web Accessibility Cookbook
  • Author(s): Manuel Matuzovic
  • Release date: June 2024
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098145606