216digital.
Web Accessibility

Phase 1
Web Remediation for Lawsuit Settlement & Prevention


Phase 2
Real-World Accessibility


a11y.Radar
Ongoing Monitoring and Maintenance


Consultation & Training

Is Your Website Vulnerable to Frivolous Lawsuits?
Get a Free Web Accessibility Audit to Learn Where You Stand
Find Out Today!

Web Design & Development

Marketing

PPC Management
Google & Social Media Ads


Professional SEO
Increase Organic Search Strength

Interested in Marketing?
Speak to an Expert about marketing opportunities for your brand to cultivate support and growth online.
Contact Us

About

Blog

Contact Us
  • How to Make Data Tables Accessible

    Data tables are a powerful way to present structured information, but without proper attention to accessibility, they can exclude users with disabilities. Whether you’re a developer, content creator, or website owner, learning how to make your tables user-friendly for everyone is an essential skill.

    Accessibility standards like WCAG (Web Content Accessibility Guidelines) provide the foundation for creating inclusive data tables. By following best practices such as structuring your tables properly, adding meaningful headers, and ensuring compatibility with assistive technologies, you can enhance usability while meeting legal and ethical standards.

    Understanding the Basics of Accessible Tables

    Before diving into the specifics, it’s important to understand what makes a table accessible. Accessible tables are designed to be navigable and understandable by all users, including those who rely on screen readers or keyboard navigation. This means paying attention to the structure, design, and additional information like captions and summaries.

    The foundation of an accessible table lies in its structure. HTML provides semantic elements like <table>, <thead>, <tbody>, and <th> to organize your data logically. Using these elements correctly ensures that assistive technologies can interpret the table properly. For example, headers defined with <th> tags allow screen readers to associate data cells with their corresponding column or row, creating a more intuitive experience for users.

    Adding Headers, Captions, and Summaries

    Headers are one of the most critical components of an accessible table. They guide users in understanding what each data point represents. To define headers, use the <th> element, and consider including the scope attribute to indicate whether the header applies to a column, row, or group of columns and rows. For example, <th scope="col"> signals that the header applies to an entire column, while <th scope="row"> applies to a row.

    Captions and summaries provide additional context for your table. A caption, placed within the <caption> tag, serves as a brief title or description of the table’s purpose. Summaries, while not an HTML element, can be included to provide a detailed explanation of the table’s content, especially if it’s complex. This can be added through the <summary> attribute or as part of surrounding content. These elements are particularly valuable for screen reader users, offering them a quick overview of what to expect.

    Ensuring Compatibility with Screen Readers

    Screen readers rely on well-structured and semantically correct HTML to interpret tables. To optimize compatibility, avoid using tables for layout purposes. While this practice was common in the past, it confuses screen readers by mixing presentational and data tables. Instead, use CSS for layout and reserve tables strictly for data.

    Another crucial consideration is avoiding merged cells unless absolutely necessary. While colspan and rowspan attributes can be used to merge cells, they can make navigation more challenging for screen reader users. If your table requires merged cells, ensure that the relationships between headers and data are clearly defined with attributes like headers and id.

    Making Tables Keyboard-Friendly

    Keyboard accessibility is vital for users who cannot use a mouse. Accessible tables should allow users to navigate logically through rows and columns using only their keyboard. Test your table to ensure that tabbing through the data follows a predictable order.

    One way to achieve this is by maintaining a logical document flow. Keep your table simple and organized to prevent users from getting lost. If the table is part of a larger webpage, include clear instructions and use skip links to help users bypass unrelated content.

    Simplifying Complex Tables

    Complex tables with nested headers or multi-level data can be difficult to navigate, even for experienced users. Simplifying these tables can go a long way toward improving accessibility. Consider breaking down large, complicated tables into smaller, more manageable ones. You can also use additional tools like expandable rows or columns to provide details without overwhelming the user.

    For situations where simplifying isn’t feasible, invest extra effort in defining relationships between headers and data. Use the headers and id attributes to explicitly associate each cell with its relevant headers. This ensures that screen readers can convey the relationships accurately, even in intricate tables.

    Improving Readability with Responsive Design and Contrast

    Accessibility isn’t just about assistive technologies—it’s also about making content visually readable for users with low vision or cognitive challenges. Responsive design is essential for ensuring that your tables are accessible across devices. Use CSS to make your tables adapt to different screen sizes without losing clarity or functionality.

    High contrast is another key factor. Choose colors that provide sufficient contrast between text and background. WCAG recommends a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. Tools like WebAIM’s Contrast Checker can help you verify compliance.

    Testing Your Tables for Accessibility

    No matter how carefully you design your tables, testing is essential to identify and address potential issues. Start by using automated tools like the WAVE Web Accessibility Evaluation Tool to check for common errors. While these tools are helpful, they can’t catch everything, so manual testing is equally important.

    Test your table using a screen reader like NVDA or JAWS to experience it as a user with visual impairments would. Pay attention to how headers, captions, and data are announced. Does the screen reader navigate the table logically? Are all elements correctly identified and described?

    Keyboard testing is another critical step. Navigate through the table using only your keyboard to ensure that all interactive elements are accessible and functional.

    Why Accessible Tables Matter

    Accessible tables aren’t just about meeting legal requirements—they’re about creating a better user experience for everyone. By making your data tables accessible, you’re opening your content to a wider audience, including individuals with disabilities who rely on assistive technologies.

    Moreover, accessibility enhances usability for all users, not just those with disabilities. Features like clear headers, logical navigation, and responsive design make tables easier to use for everyone, whether they’re on a desktop computer or a smartphone.

    Conclusion

    Creating accessible data tables might require extra effort, but the benefits are well worth it. By following best practices like using proper structure, adding descriptive headers and captions, and ensuring compatibility with assistive technologies, you can make your tables both compliant and user-friendly.

    Remember, accessibility is an ongoing process. Stay informed about updates to guidelines like WCAG and continuously test your content to ensure it meets the highest standards. By prioritizing accessibility, you’re not just improving your website—you’re making the web a more inclusive space for all.

    Ready to take the first step? Partner with the experts at 216digital, who understand accessibility inside and out. Together, we can create a web that works for everyone—and protect your business in the process. Schedule your complimentary ADA briefing today to start your journey toward an accessible and compliant future.

    Greg McNeil

    December 11, 2024
    How-to Guides
    Accessibility, Data tables, How-to, web developers, web development, Website Accessibility
  • Small Design Choices, Big Accessibility Wins for All E-Commerce

    In the ever-evolving world of online shopping, small design choices can have a massive impact on customer experience—especially when it comes to accessibility. The beauty of accessible design isn’t just about meeting legal requirements; it’s about creating a shopping environment where everyone, regardless of their abilities, can navigate, interact, and complete purchases effortlessly. For e-commerce businesses, embracing accessibility means happier customers, improved loyalty, and ultimately, higher sales. Let’s explore some easy-to-implement design changes that can create big wins for your e-commerce store.

    Skip Navigation Links: A Keyboard and Screen Reader Lifesaver

    For many e-commerce users, particularly those who rely on screen readers or navigate using keyboards, skip navigation links are game-changers. These simple links allow users to bypass repetitive menus and jump straight to the main content.

    Imagine browsing an e-commerce site with dozens of product categories listed in a navigation bar. For someone tabbing through every link, it could feel like running a marathon before even reaching the product descriptions. Skip navigation links eliminate this hassle, ensuring users can quickly find what they’re looking for. Plus, it’s not just about accessibility—it’s about efficiency for all users.

    How to Implement

    Here’s an example of a skip navigation link implemented in HTML and CSS:

    <a href="#main-content" class="skip-link sr-only">Skip to Main Content</a>
    
    .sr-only { 
      position: absolute; left: -10000px; 
    } 
    .skip-link { 
      color: black; background-color: white; padding: 12px; border: 2px solid black; border-radius: 5px; z-index: 999; 
    } 
    .skip-link:focus-visible { 
      left: 0px; 
    }
    

    Add an id to the main content section to link to it:

    <div id="main-content">
      <!-- Main content goes here -->
    </div>

    This ensures the link appears only when focused, providing a seamless experience for keyboard users.

    Quick Links: Streamline Product Page Navigation

    E-commerce product pages often pack in a wealth of information, from product descriptions and specifications to reviews and related products. While comprehensive details are a plus, they can also feel overwhelming. That’s where quick links come in.

    By adding anchor links at the top of product pages, you give customers the option to jump directly to the section they care about most. Whether it’s “Customer Reviews,” “Specifications,” or “Add to Cart,” quick links make the browsing experience smooth and satisfying. This small touch can be a big win for users with disabilities, who might otherwise struggle to scroll through dense pages.

    How to Implement

    Use anchor links combined with id attributes:

    <nav>
      <ul>
        <li><a href="#description">Description</a></li>
        <li><a href="#specs">Specifications</a></li>
        <li><a href="#reviews">Customer Reviews</a></li>
      </ul>
    </nav>
    
    <section id="description">
      <h2>Product Description</h2>
      <p>Details about the product...</p>
    </section>
    
    <section id="specs">
      <h2>Specifications</h2>
      <p>Technical details...</p>
    </section>
    
    <section id="reviews">
      <h2>Customer Reviews</h2>
      <p>What customers are saying...</p>
    </section>

    Anchor links make navigation more accessible for all users, particularly those using assistive technologies.

    Repeated Call-to-Actions: Boost Engagement on Lengthy Pages

    Sometimes, e-commerce pages are lengthy by necessity—think of category pages featuring hundreds of products or detailed FAQs. Repeating key call-to-action (CTA) buttons, like “Add to Cart” or “Subscribe,” ensures users always have easy access to the next step.

    Why does this matter? For users with mobility issues or those navigating on mobile devices, scrolling back to the top for a CTA can be frustrating. A well-placed button at regular intervals keeps the experience seamless and reduces the risk of abandonment.

    To learn more about CTA’s and web accessibility, check out our article “Why ‘Click Here’ Hurts Your Website’s Accessibility.“

    How to Implement

    Here’s an example of a repeated CTA in HTML:

    <section>
      <p>Great deals await! Don’t miss out.</p>
      <a href="/checkout" class="cta-button">Add to Cart</a>
    </section>
    <section>
      <p>Ready to buy? Click below.</p>
      <a href="/checkout" class="cta-button">Add to Cart</a>
    </section>

    Enhance with CSS for visibility:

    .cta-button {
      display: inline-block;
      padding: 10px 20px;
      background-color: #007bff;
      color: white;
      text-decoration: none;
      font-size: 16px;
      border-radius: 5px;
    }
    .cta-button:hover {
      background-color: #0056b3;
    }

    High Contrast Colors: Accessibility Meets Visual Appeal

    Choosing high-contrast color combinations is one of the simplest yet most impactful accessibility adjustments an e-commerce site can make. Text should always stand out against its background, ensuring readability for users with low vision or color blindness.

    For instance, pairing black text on a white background is a classic high-contrast choice. Avoid combinations like light gray text on a white background—it may look sleek, but it’s a nightmare for users with visual impairments. Use online contrast checkers to ensure your color scheme meets Web Content Accessibility Guidelines (WCAG) standards.

    Descriptive Alt Text: Elevate Your Product Images

    Images play a starring role in e-commerce. From close-up shots of fabrics to 360-degree views of products, visuals help customers make informed decisions. But what about users who can’t see the images?

    Enter descriptive alt text. This essential element of accessible design provides text-based descriptions of images, allowing screen readers to convey their content. For example, instead of “Image of a shirt,” use something like “Blue cotton button-down shirt with long sleeves and a slim fit.” Not only does this help visually impaired users, but it also boosts your SEO, making your e-commerce site more discoverable.

    How to Implement

    Add descriptive alt text to your images in the alt attribute:

    <img src="blue-shirt.jpg" alt="Blue cotton button-down shirt with long sleeves and a slim fit">

    Accessible Forms: Smooth Checkout Experiences

    Forms are a staple of e-commerce, whether for creating accounts, signing up for newsletters, or completing purchases. Yet, poorly designed forms can alienate customers with disabilities.

    To ensure your forms are accessible:

    • Use clear labels for every field, even if it seems obvious.
    • Include error messages that explain the problem in plain language, like “Please enter a valid email address.”
    • Add focus indicators to show users where they are on the page as they tab through the form.

    These small changes make the checkout process easier for all customers while reducing cart abandonment rates.

    How to Implement

    Use clear labels, error messages, and focus indicators:

    <form>
      <label for="email">Email Address</label>
      <input type="email" id="email" name="email" required>
      
      <span id="error-message" style="color: red; display: none;">
        Please enter a valid email address.
      </span>
      <button type="submit">Submit</button>
    </form>

    Add JavaScript to show error messages dynamically:

    document.querySelector('form').addEventListener('submit', function(event) {
      const emailField = document.getElementById('email');
      if (!emailField.value.includes('@')) {
        event.preventDefault();
        document.getElementById('error-message').style.display = 'block';
      }
    });

    Ensure focus indicators are clear for keyboard users:

    input:focus {
      outline: 2px solid #007bff;
    }

    Accessibility Benefits Everyone

    While these features are designed with accessibility in mind, they often enhance the overall e-commerce experience for all users. For example, quick links and repeated CTAs aren’t just for users with disabilities—they make navigating long pages faster for everyone. High-contrast colors don’t only help users with low vision; they’re also easier to read in bright sunlight on mobile devices.

    Inclusive design doesn’t just expand your audience; it builds trust. Customers recognize and appreciate when a business goes the extra mile to ensure their shopping experience is smooth and enjoyable.

    The Payoff: Happier Customers and Higher Sales

    By incorporating accessibility features, you’re not just meeting legal obligations—you’re investing in your customers’ satisfaction. When customers feel valued and supported, they’re more likely to complete purchases, leave positive reviews, and return for future shopping. The result? A stronger, more inclusive e-commerce brand that thrives in today’s competitive market.

    Ready to take the next step? Schedule an ADA briefing with 216digital today to explore how accessibility can elevate your e-commerce site. Simply use the contact form at the bottom of this page to get started. Let’s work together to create a better online shopping experience for all!

    Make the change. Create an e-commerce experience that works for all—and watch as those small design choices turn into big accessibility wins!

    Greg McNeil

    December 6, 2024
    How-to Guides, The Benefits of Web Accessibility
    Accessibility, e-Commerce, ecommerce website, How-to, Web Accessibility
  • Skip Links: Improve Web Accessibility & Navigation

    More and more, digital accessibility has become a major talking point when browsing the web. One of the key components that improve accessibility for users with disabilities is something many users might not even notice: skip links.

    These simple yet powerful tools can make a huge difference in the web experience for individuals relying on keyboard-only interaction, screen readers, or other assistive technologies. In this article, we’ll explore the importance of skip links, their technical mechanics, and how you can implement them effectively on your website.

    What Are Skip Links and Why Are They Important?

    Skip links are navigational links that allow users to skip over repetitive content such as headers, navigation menus, or other elements they’ve already seen. For users relying on assistive technologies like screen readers, keyboard navigation, or switch devices, skip links enable them to jump directly to the main content of the page.

    When navigating a website using a keyboard (by pressing the Tab key), users typically encounter all of the page’s links and elements in a set order. This often means they have to cycle through the same menus, headers, and other repetitive content every time they visit a new page or reload an existing one. Skip links solve this problem by providing an easy way to bypass these elements, saving time and frustration for those who need alternative navigation methods.

    For example, imagine you’re using a screen reader to navigate a website. Without skip links, you might be forced to listen to the same navigation menu and header over and over again, even though you’re only trying to get to the main body of the page. Skip links allow you to bypass this content, going straight to the part of the page you want.

    The Key Benefits of Skip Links

    Improved Navigation for Keyboard-Only Users

    Many people with disabilities, including those with limited mobility or dexterity, use keyboards or alternative input devices to navigate the web. Skip links let users quickly navigate to the main content, bypassing headers, footers, and menus that they may have already accessed.

    Enhanced Experience for Screen Reader Users

    Screen readers announce every element on a webpage in the order they are tabbed through. Without skip links, users would have to hear the same menus and links repeatedly, making navigation time-consuming and tedious. Skip links streamline the experience by providing a shortcut to the main content.

    Better Usability for Assistive Technologies

    Skip links are a simple yet effective tool that benefits various assistive technologies, enhancing the overall usability of your website for a wide range of users.

    Increased Accessibility Compliance

    Many countries and regions have laws requiring websites to be accessible. For example, in the United States, the Americans with Disabilities Act (ADA) mandates that websites must be accessible to all users, including those with disabilities. Implementing skip links helps ensure your website is compliant with accessibility guidelines like Web Content Accessibility Guidelines (WCAG).

    How Do Skip Links Work?

    Skip links work by creating a link that, when activated, allows the user to bypass parts of the webpage and move directly to a more relevant section. These links are typically placed at the top of the page, visible only when the user navigates using the keyboard (by pressing the Tab key). The link itself usually says something like “Skip to main content,” “Skip to navigation,” or “Skip to footer,” depending on which section the user wants to bypass.

    The Technical Mechanics of Skip Links

    To create a skip link, you use basic HTML along with some helpful attributes to control the behavior and accessibility of the link. Here’s an overview of the technical aspects of skip links:

    HTML Structure with <a href> Tags

    The primary way to implement skip links is with the <a> (anchor) tag, which creates hyperlinks. These links should point to specific elements within the webpage, often with id attributes to mark the sections users can skip to.

    tabindex Attribute

    The tabindex attribute is used to control the tab order of elements. By default, links and form controls are included in the tab order. However, for skip links to work properly, they need to be made focusable before other content is tabbed through.

    aria-label and aria-hidden Attributes

    The aria-label attribute can be used to provide screen readers with a more descriptive label for the skip link. For example, you can use it to define a more readable label like “Skip to main content,” ensuring that screen readers announce the skip link’s purpose clearly. On the other hand, the aria-hidden attribute can be used to hide elements from assistive technologies when needed.

    A Simple Skip Link Example

    Here’s a simple HTML example of a skip link that allows users to skip directly to the main content of a webpage:

    <a href="#main-content" class="skip-link" tabindex="0" aria-label="Skip to main content">Skip to main content</a>
    <header>
    <nav> <!-- Navigation Links --> </nav>
    </header>
    <main id="main-content">
    <h1>Welcome to Our Website</h1>
    <p>This is the main content of the page...</p>
    </main>

    In this example:

    • The skip link (<a href="#main-content">) is placed at the top of the page and links to the main-content section identified by the id="main-content".
    • The tabindex="0" ensures that the skip link is focusable and can be reached when using the Tab key.
    • The aria-label="Skip to main content" helps screen reader users understand what the link does.

    Styling Skip Links

    While skip links are crucial for accessibility, they’re not always visually appealing by default. To make skip links blend in with your design, you’ll likely want to hide them until they’re needed and style them for better usability. Here’s how you can style skip links using CSS:

    .skip-link {
    position: absolute;
    top: -40px; /* Hide the link off-screen */
    left: 0;
    background-color: #000;
    color: #fff;
    padding: 10px;
    z-index: 100;
    }
    .skip-link:focus {
    top: 10px; /* Bring the link into view when focused */
    }

    In this example:

    • The .skip-link class hides the skip link off-screen with top: -40px until it’s needed.
    • When the link is focused (i.e., when the user tabs to it), it becomes visible by setting top: 10px.
    • You can customize the background color, text color, padding, and positioning to match your website’s design.

    JavaScript for Enhanced Skip Link Functionality

    In some cases, you may want to enhance the behavior of your skip link using JavaScript. For example, you might want to automatically focus the main content once the skip link is activated. Here’s how you can do that:

    document.querySelector('.skip-link').addEventListener('click', function(e) {
    e.preventDefault();
    document.querySelector('#main-content').focus();
    });

    This script listens for a click on the skip link and prevents the default action (i.e., jumping to the href target). Instead, it uses JavaScript to focus on the main content section, making it even easier for users to access.

    Testing Skip Links for Accessibility

    Once you’ve implemented skip links, it’s essential to test them to ensure they’re working as expected. Here are a few key tips for testing your skip links:

    1. Keyboard Navigation: Use the Tab key to cycle through the elements on your page. Ensure the skip link is the first item that can be focused and that it jumps you to the main content.
    2. Screen Reader Testing: Test your skip links with a screen reader (such as NVDA or VoiceOver) to ensure the skip links are announced correctly and work as expected.
    3. Cross-Browser Compatibility: Make sure your skip links work across different browsers and devices. Some older browsers might have quirks that affect the behavior of tabindex or CSS styling, so testing across multiple platforms is critical.
    4. Accessibility Tools: Use automated accessibility tools like Lighthouse to check for accessibility issues on your website. These tools can help identify missing or misused attributes related to skip links.

    Challenges with Skip Links

    While skip links are an essential tool for accessibility, there are some challenges you might encounter when implementing them:

    • Browser Inconsistencies: Different browsers and devices may render skip links or handle focus management differently. It’s important to test across various platforms to ensure consistent behavior.
    • Visibility and Styling: Skip links should be visible when needed but unobtrusive when not. Ensuring they are easily accessible but don’t clutter the design can require some careful styling.
    • Managing Focus Order: If your page has dynamic content (like modals or sticky headers), you may need to adjust the focus order or ensure that skip links still work as expected when these elements are present.

    Skip Ahead to Success

    Skip links are a simple but vital tool in improving the accessibility of your website. They help keyboard-only users, screen reader users, and others navigate your site more efficiently by skipping over repetitive content and jumping straight to the main sections of the page. By implementing skip links with proper HTML, CSS, and JavaScript, you can enhance the user experience for a wider audience, making your site more inclusive and accessible.

    If you’re ready to make your website ADA-compliant and accessible to everyone, schedule an ADA briefing with 216digital. Our team of experts will walk you through the process, address any questions, and help you create an inclusive, compliant, and user-friendly web experience. Don’t wait—take the first step toward a more accessible digital presence today.

    Greg McNeil

    November 21, 2024
    How-to Guides
    Accessibility, How-to, skip link, Web Accessibility, web developers, web development
  • Should Designers Hit Pause on Animation?

    Animation can bring a website to life, but have you ever considered how it impacts all users? While animations and gifs can make a site feel more dynamic, they can also cause some visitors discomfort—or worse—. Let’s explore why animations can be tricky from an accessibility standpoint and how you can design them to be both engaging and inclusive.

    Why Animation Can Be Problematic

    Animations aren’t just flashy extras—they can deeply affect how users experience your website, and not always in a good way.

    • Motion Sensitivity: Some people have vestibular disorders that make them sensitive to movement on screens. Animations like parallax scrolling or sliding elements can trigger dizziness, vertigo, or nausea.
    • Seizures: Flashing lights or strobing effects can be dangerous for users with photosensitive epilepsy. Even subtle flickers can cause issues.
    • Cognitive Overload: Busy or overly complex animations can overwhelm users with cognitive impairments, making it hard for them to focus or understand the content.
    • Assistive Technology Interference: Screen readers and other tools can struggle with animations that change content dynamically, leading to confusion.

    These challenges highlight why designers need to think critically about when and how they use animations.

    Does Your Design Really Need Animation?

    Not every project calls for animation. Before you add that fancy effect, ask yourself:

    • Does it serve a purpose?
    • Will it help users navigate or understand the site?
    • Could it distract or overwhelm someone?

    Animations should always have a clear function, like drawing attention to a call-to-action or giving feedback on an interaction. If the animation doesn’t improve usability, it might be best to skip it.

    Making Animations Accessible

    If you must use an animation, here are some tips to ensure it doesn’t cause issues for people with cognitive or visual impairments:

    1. Keep It Simple: Avoid overly elaborate or decorative effects. Subtle transitions or fades can be just as effective without being overwhelming.
    2. Mind the Timing: Speed matters. Too fast, and users might get lost; too slow, and they could grow impatient. Aim for a balance that feels natural.
    3. Give Users Control: All animations should have visual and accessible controls to pause and play the animation. Always respect the prefers-reduced-motion media query.
    4. Focus on Purpose: Every animation should add value. Whether it’s guiding users or making content clearer, make sure it serves a meaningful purpose.

    A Quick Fix with prefers-reduced-motion

    One of the easiest ways to address motion sensitivity is by using the prefers-reduced-motion media query. This CSS feature checks if a user has reduced motion enabled on their device and adjusts animations accordingly.

    Here’s how you can tone down animations for users who prefer less motion:

    @media (prefers-reduced-motion: reduce) {  
      .animated-element {  
        animation: none;  
        transition: none;  
      }  
    }  

    Want to simplify rather than completely disable? Try this:

    @media (prefers-reduced-motion: reduce) {  
      .fade-in {  
        animation: fade-in 0.5s linear;  
      }  
    }  
    @keyframes fade-in {  
      from { opacity: 0; }  
      to { opacity: 1; }  
    }  
    

    This approach keeps your design functional while reducing the risk of discomfort for sensitive users.

    What Does WCAG Say About Animation?

    The Web Content Accessibility Guidelines (WCAG) offer clear rules about animations. Two of the most relevant criteria are:

    • 2.3.1: Three Flashes or Below Threshold
    • Avoid animations that flash more than three times per second. It’s a crucial step in reducing the risk of seizures.
    • 2.3.3: Animation from Interactions
    • If animations are triggered by user actions, make sure they can be disabled without affecting functionality.

    Following these guidelines helps ensure your site is usable for everyone.

    Testing Your Animations

    Testing is an essential part of designing accessible animations. Here’s how to do it effectively:

    • Check Motion Settings: Turn on the “reduce motion” setting on your device (available on macOS, Windows, iOS, and Android) and see how your site responds.
    • Try Keyboard Navigation: Ensure animations don’t interfere with keyboard functionality. Can users still tab through links and buttons smoothly?
    • Use Automated Tools: Tools like Lighthouse can catch accessibility issues related to animations.
    • Gather Feedback: Get input from real users, especially those with disabilities. They’ll provide insights you might not have considered.

    Accessible Animation with JavaScript

    Sometimes, you’ll need JavaScript to handle animations. You can still make them accessible by pairing JavaScript with prefers-reduced-motion.

    Here’s a quick example:

    const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)');  
    if (reduceMotion.matches) {  
      // Turn off animations for users who prefer reduced motion  
      document.querySelector('.animated-element').style.animation = 'none';  
    } else {  
      // Keep animations for everyone else  
      document.querySelector('.animated-element').classList.add('run-animation');  
    }   

    This snippet ensures your animations adapt to user preferences without requiring manual toggles.

    Wrapping It Up

    Animations can be a powerful tool for creating engaging, interactive websites—but they should never come at the expense of accessibility. By keeping animations simple, purposeful, and user-controlled, you can deliver a better experience for all your visitors.

    Don’t forget to test your designs with real users and tools, and make use of features like prefers-reduced-motion to accommodate different needs. Thoughtful design is inclusive design, and accessible animations are a small change that can make a big difference. If you’re unsure if the animations on your website are accessible or would like an expert partner to help you get started, reach out to 216digital using the contact form below.

    Bobby

    November 14, 2024
    How-to Guides
    Accessibility, animation, How-to, web developers, web development, Website Accessibility
  • Understanding Focus Outlines for Web Accessibility

    Have you ever tried navigating a website without a mouse, relying only on your keyboard? It might seem unusual, but for many people with motor disabilities or visual impairments, this is their everyday reality. Focus outlines—the visual markers that highlight where you are on a page—are essential tools that make this possible.

    Unfortunately, these outlines often get overlooked or even removed during web design, leaving a significant number of users struggling to navigate sites effectively. Let’s break down what focus outlines are, why they matter, and how you can implement them to make your website more inclusive.

    What Is a Focus Outline?

    A focus outline is a visual indicator, often a highlighted border or underline, that appears around a web element when it gains keyboard focus. This outline helps users understand which interactive element they are currently on, whether it’s a link, button, form field, or other focusable component. For example, when a user tabs through a webpage, the focus outline moves from one element to the next, providing a visual cue about their current location on the page.

    This feedback is essential for users who cannot use a mouse and instead navigate by pressing the “Tab” key to move forward and “Shift + Tab” to move backward. For those relying on screen readers, focus outlines further aid in understanding the structure of a page, confirming the position on the screen, and reducing the cognitive load required to navigate the web effectively.

    Why Focus Outlines Matter for Accessibility

    Focus outlines aren’t just nice to have—they’re a must-have for accessibility. According to the Web Content Accessibility Guidelines (WCAG), specifically criterion 2.4.7: Focus Visible, mandate that any keyboard-operable interface must have a visible focus indicator. This ensures that users relying on keyboard navigation always know where they are on the page.

    Who Benefits from Focus Outlines?

    For users with motor disabilities, such as those who have difficulty controlling fine motor movements or are unable to use a mouse, keyboard navigation is a primary means of interacting with digital content. The focus outline serves as a reliable marker of where they are on the page, making navigation smooth and efficient. People with low vision or visual impairments who use high-contrast settings also rely on focus outlines for an additional layer of navigation support, enabling them to visually follow along.

    Legal and Ethical Responsibilities

    Beyond enhancing the user experience, implementing visible focus outlines is a legal and ethical responsibility for organizations. Without them, websites may fail to meet accessibility standards, putting them at risk of non-compliance with the WCAG guidelines. For organizations, following WCAG isn’t just about adhering to regulations; it’s about creating an inclusive experience that all users can navigate.

    How to Create Accessible Focus Outlines

    Making focus outlines accessible and noticeable is all about ensuring they stand out. Here are some tips:

    • Use Sufficient Color Contrast: Choose colors that contrast well with both the element and the background.
    • Choose a Noticeable Style: Solid, dotted, or dashed lines can all work, as long as they’re easily visible.
    • Adjust Thickness: A thicker outline can be more eye-catching and easier to see.

    How to Style Focus States Using CSS

    Outlines can be solid, dotted, or dashed lines, as long as they are visible. Adjusting the thickness can also make the outline more noticeable.

    Example: Basic Focus Outline with CSS

    button:focus,
    a:focus {
      outline: 3px solid #007acc;
    }

    In this example, we’ve applied a 3-pixel solid blue outline to buttons and links when they’re focused. Before finalizing colors, use tools like the WebAIM Contrast Checker to ensure they meet the recommended contrast ratio of at least 3:1 for user interface components.

    Add Background Effects

    For a more custom look, consider adding a background color or shadow effect:

    button:focus {
      outline: none;
      box-shadow: 0 0 5px 2px rgba(0, 122, 204, 0.8);
    }

    This replaces the default outline with a subtle glow, making the focused element stand out without clashing with your design. Just remember to test these styles to ensure they’re visible to everyone, including users with visual impairments.

    Avoiding Common Mistakes with Focus Outlines

    One of the most common pitfalls in web design is removing focus outlines entirely. Designers sometimes find default focus outlines unattractive and may remove them without providing a suitable replacement. While this might make the site look cleaner, it creates significant accessibility barriers for users relying on keyboard navigation. WCAG guideline 2.4.7 requires focus indicators for compliance, so removing focus outlines can result in a failure to meet accessibility standards.

    If you’re tempted to hide the default outline, remember that it’s better to customize it than to remove it. Replacing the outline with a custom design can enhance the aesthetics of your website without sacrificing accessibility. Just ensure that your custom design maintains a strong visual presence and sufficient color contrast.

    Another common mistake is creating focus outlines that blend too closely with the background. This can happen when designers use colors that don’t contrast well with surrounding elements or backgrounds. Remember, users with low vision may struggle to differentiate between similar shades, so it’s essential to test the visibility of focus outlines across various screens and devices.

    Testing Focus Visibility

    Testing is a crucial step to ensure your focus outlines are effective:

    1. Navigate Your Site Using Only the Keyboard: Press the “Tab” key to move through interactive elements and observe the focus outline.
    2. Check Every Interactive Element: Ensure that links, buttons, form fields, and other focusable components have a visible focus state.
    3. Assess Visibility and Consistency: The focus outline should be easily noticeable and consistent across your site.
    4. Accessibility Tools: Tools like Google Lighthouse or WAVE can check WCAG compliance, including focus outlines.

    Make Focus Outlines a Priority

    Focus outlines aren’t just a design detail—they’re a vital part of creating an inclusive web experience. By ensuring your site has clear and consistent focus indicators, you can make your website more accessible for everyone. So, take action today to ensure your website is accessible. Your customers—and your bottom line—will thank you!

    For personalized guidance on making your website ADA compliant, reach out to 216digital for an ADA briefing. Our experts are here to help you navigate the complexities of web accessibility and secure your business against potential legal risks.

    Kayla Laganiere

    November 13, 2024
    How-to Guides
    Accessibility, focus outlines, How-to, web developers, web development, Website Accessibility
  • Accessibility Checklist: Your Guide to Compliance

    Creating an accessible website goes beyond just checking a few boxes—it’s about enabling everyone, including people with disabilities, to engage with your content smoothly. A well-structured accessibility checklist can help you address common barriers, test thoroughly, prioritize fixes, and ensure ongoing compliance with accessibility standards.

    Here’s a comprehensive web accessibility checklist to guide you through essential steps:

    Understand and Set Your Accessibility Goals

    Define accessibility goals based on WCAG (Web Content Accessibility Guidelines) standards.


    Before diving into specific changes, remember that your accessibility improvements should align with recognized standards, particularly WCAG 2.1 A/AA levels. Setting these goals from the start ensures your site meets both legal requirements (like ADA compliance in the U.S.) and the diverse needs of your users. Following an accessibility checklist can help ensure each goal is met.

    Audit Your Website for Accessibility Gaps

    Conduct an initial audit to identify accessibility issues.

    An audit gives a clear view of your website’s current accessibility status, spotlighting areas that need attention. Use tools like automated scanners, manual audits, and assistive technologies (AT) such as screen readers to uncover common barriers. An accessibility checklist is helpful here to document each area tested, including:

    • Keyboard Navigation: Verify that users can navigate your site without a mouse, using keyboard commands only.
    • Color Contrast: Use a contrast checker to ensure text is readable for people with low vision.
    • Alt Text for Images: Check that all images have descriptive alt attributes, making content accessible for visually impaired users.

    Ensure Keyboard Navigation is Intuitive

    Ensure users can navigate your site fully with a keyboard.

    Keyboard navigation is essential for users who don’t use a mouse. This includes making sure all interactive elements like buttons, forms, and links are accessible with the “Tab” and “Enter” keys.

    • Focus States: Make sure focus states (visual indicators for keyboard users) are visible and defined.
    • Logical Order: Verify that the tab order follows a logical sequence, mirroring the visual layout.

    To learn more about keyboard navigation, check out our article, “What is Keyboard Navigation?”

    Implement Proper Use of Alt Text for Images

    Add descriptive alt text to all informative images.

    Alt text serves as an alternative to images, allowing screen readers to describe visuals to visually impaired users.

    • Functional vs. Decorative: Use alt text for images conveying essential information. Use alt=”” for decorative images to prevent screen readers from reading unnecessary details.
    • Descriptive Text: Avoid vague descriptions like “image” and offer concise, informative details to convey the image’s purpose.

    For additional information about alt text, read our article “Understanding Image Alt Text Descriptions.”

    Ensure Sufficient Color Contrast

    Check and adjust color contrast to meet accessibility standards.

    Adequate contrast between text and background ensures readability, especially for users with visual impairments. WCAG recommends a minimum contrast ratio of 4.5:1 for regular text and 3:1 for larger text.

    • Tools: Use WebAIM’s Contrast Checker to verify compliance.
    • Avoid Color-Only Cues: Avoid relying solely on color to convey important information, as colorblind users might miss these cues. Pair colors with other indicators, like icons or text labels.

    Use Semantic HTML Structure

    Build a well-structured HTML hierarchy for better accessibility.

    A clear HTML structure is essential for screen readers and other assistive devices. Proper tags help convey the structure and purpose of your content.

    • Headings: Use heading tags (<h1>, <h2>, etc.) in a logical order, guiding users through content.
    • Landmarks: Include ARIA landmarks like role= “navigation” and role= “main” for easier page navigation.
    • Lists and Tables: Use HTML lists for lists and tables for data, not layout purposes.

    Check out our articles, “How Semantic HTML Improves Your Accessibility & SEO?” or  “How to Implement ARIA Landmarks and Roles for Better Accessibility”  for a deeper dive into semantic HTML and ARIA landmarks.

    Test with Assistive Technologies

    Test your website with various assistive technologies.

    Testing with AT tools like screen readers, voice recognition, and magnification provides insights into your site’s accessibility. Common screen readers include JAWS, NVDA, and VoiceOver.

    • Screen Reader Testing: Check that all text, buttons, and links are accessible with screen readers.
    • Voice Navigation: Confirm that users can navigate all interactive elements using voice commands.
    • Magnification Tools: Ensure that the design remains usable when zoomed to 200%.

    Incorporate Accessible Forms

    Design forms with clear labels and error messages.

    Accessible forms enable users to enter information accurately and with ease.

    • Labels and Instructions: Each form field should have a visible label. Use placeholder text sparingly.
    • Error Handling: Provide clear error messages when input is invalid. Describe what went wrong and how to fix it.
    • Field Focus: Ensure that after submission, the keyboard focus moves to the first field needing correction.

    Conduct Remediation Based on Prioritized Issues

    Address identified accessibility issues based on their impact.

    After auditing, prioritize fixes by severity and frequency. Address critical issues first, especially those that affect navigation and content comprehension.

    Implement Continuous Monitoring with Tools Like a11y.Radar

    Set up ongoing accessibility monitoring to maintain compliance.

    Web accessibility is a continuous effort. New content or design changes can create new barriers, so ongoing monitoring tools like a11y.Radar can be part of your accessibility checklist, alerting you to real-time issues.

    • Real-Time Alerts: Get notifications for new issues, allowing for prompt fixes.
    • Automated Reports: Schedule regular accessibility reports to stay aware of your compliance status.

    Conduct Routine Manual and Automated Testing

    Schedule consistent accessibility testing intervals.

    Automated tools are helpful for common issues, but manual testing finds more complex accessibility gaps. A mix of both ensures a thorough evaluation.

    • Automated Testing: Use tools like Google Lighthouse or WAVE for quick assessments.
    • Manual Testing: Focus on custom components that automated tools may not fully catch.

    Keep Up-to-Date with WCAG Guidelines

    Stay current on WCAG updates and best practices.

    Accessibility standards evolve to meet new needs. KRegularly updating your accessibility checklist ensures compliance with the latest WCAG guidelines, like WCAG 2.2 or 3.0.

    • Review WCAG Changes: Familiarize yourself with new criteria.
    • Align with a11y.Radar: Ensure your monitoring tools adapt to updates, maintaining continuous compliance.

    Take the First Step Towards Accessibility

    Creating an accessible website is essential not only for compliance but for providing a truly inclusive experience for all users. By following a structured approach to accessibility—setting goals, auditing your site, prioritizing fixes, and maintaining continuous monitoring—you’re laying a solid foundation for an accessible, user-friendly site.

    If you’re ready to make accessibility a priority but need guidance on how to navigate ADA compliance, consider scheduling an ADA briefing with 216digital. Our team can help you navigate accessibility standards, pinpoint key areas for improvement, and develop a checklist tailored to your site’s needs. Take the first step toward making your website accessible to all—schedule your ADA briefing with 216digital today and ensure your digital presence is compliant, inclusive, and welcoming.

    Greg McNeil

    November 12, 2024
    How-to Guides
    Accessibility, accessible checklist, How-to, Website Accessibility
  • Why Touch Targets Impacts Accessibility

    Imagine this: a customer visits your website, excited to snag a deal on their holiday shopping list. They’re scrolling through your page on their phone, ready to click “add to cart,”—but then they hit a roadblock. The buttons are too small, links are crowded together, and navigating your site becomes a frustrating game of “tap and hope.” Now imagine if that customer has limited dexterity or relies on assistive technology. For them, those tiny buttons and cramped links aren’t just an inconvenience; they’re a barrier.

    Accessibility issues like these don’t just affect your users’ experience—they impact your bottom line and even your legal compliance. Making sure your site’s touch targets are easy to interact with is one of the simplest yet most impactful changes you can make. In this guide, we’ll cover why large, accessible touch targets matter, how they boost usability for everyone, and what steps you can take to ensure your site is welcoming to all.

    What Are Touch Targets and Why Are They Important?

    Touch targets are interactive elements—such as buttons, links, and form controls—that users engage with as they navigate your website. The size and spacing of these elements can make or break the experience, especially for users on mobile devices or those with physical limitations. If touch targets are too small or closely spaced, users may struggle to click or tap accurately, leading to frustration and a poor experience. This can be particularly challenging for older adults and individuals with limited dexterity.

    Making touch targets sufficiently large and spaced out allows everyone to navigate and interact with your site more easily, enhancing both usability and inclusivity. This is a foundational aspect of web accessibility that ensures your website works well for all.

    WCAG Guidelines: Key Standards for Touch Target Size

    To provide clear guidance on accessible touch target sizes, the Web Content Accessibility Guidelines (WCAG) have established several success criteria. WCAG 2.1 and the updated WCAG 2.2 outline standards to help developers make online content accessible, mainly through adequately sized touch targets.

    Success Criterion 2.5.5 (Target Size)

    In WCAG 2.1, Criterion 2.5.5 specifies that interactive elements should meet a minimum touch target size of 44×44 pixels, making it easier for users with limited motor skills or assistive technology to select the right element.

    Success Criterion 2.5.8 (Target Size – Enhanced)

    WCAG 2.2 expands on this with Criterion 2.5.8, recommending even larger touch targets when interactive elements are positioned close together. This helps users avoid accidentally tapping the wrong element, especially on mobile devices or when using screen readers.

    These guidelines establish a foundation for accessible design, giving developers clear targets to create user-friendly, inclusive sites that reduce errors and improve the overall user experience.

    Best Practices for Designing Accessible Touch Targets

    With WCAG standards in mind, you can take steps to create touch targets that enhance usability. Here are some essential practices for implementing accessible interactive elements:

    Use Adequate Padding and Margin

    Padding and margins around buttons and links help ensure they meet minimum size requirements while maintaining a clean visual layout. For example:

    button {
      padding: 12px 20px; /* Increases padding for larger touch target */
      font-size: 16px;
    }

    Ensure Minimum Width and Height

    Using min-width and min-height properties guarantees that buttons and other elements stay at least 44×44 pixels, even when the element content is smaller. This maintains accessibility across different screen sizes.

    button {
      min-width: 44px;
      min-height: 44px;
    }

    Space Out Interactive Elements

    Placing enough space between buttons and links prevents mis-taps and ensures usability for all users, especially those on mobile devices or using assistive technologies.

    button, a {
      margin: 10px;
    }

    Add ARIA Attributes for Enhanced Accessibility

    ARIA attributes (Accessible Rich Internet Applications) add context to interactive elements for users relying on assistive devices. For instance, using aria-expanded or aria-haspopup on a menu button helps screen reader users understand its function.

    <button aria-expanded="false" aria-haspopup="true">Menu</button>

    Responsive Design: Ensure Touch Target Size Across Devices

    Since many users rely on mobile devices for browsing, it’s essential to make touch targets easily accessible on smaller screens. Using responsive CSS ensures that touch targets adapt to various screen sizes:

    @media (max-width: 600px) {
      button {
        padding: 15px 25px; /* Larger padding on smaller screens */
      }
    }

    Testing Touch Target Accessibility

    Once you’ve optimized your touch targets, testing is essential to ensure they’re functional and accessible. Here are a few testing strategies to confirm usability:

    • Manual Testing: Test your site on various devices (desktop, tablet, mobile) to ensure touch targets are easy to access and use.
    • Accessibility Tools: Tools like Google Lighthouse or WAVE can check WCAG compliance, including touch target sizes.
    • User Testing: Feedback from real users, particularly those with disabilities, is invaluable for assessing how accessible and user-friendly your touch targets are.

    Wrapping Up

    Improving touch target accessibility is just one of many steps toward making your website genuinely inclusive and user-friendly. By focusing on accessible design, you not only enhance the experience for users with mobility challenges and those using assistive technologies but also build a site that’s welcoming and intuitive for everyone. Following WCAG guidelines, using best coding practices, and regular testing are essential—but navigating these standards alone can be overwhelming.

    If you’re ready to take accessibility seriously and want to ensure your site is fully ADA-compliant, consider scheduling an ADA briefing with 216digital. Our team of accessibility experts can help you identify potential compliance issues, create actionable solutions, and guide you through the process of building a more accessible and inclusive website. Reach out today to learn how we can help safeguard your site and open new opportunities with ADA compliance.

    Greg McNeil

    November 8, 2024
    How-to Guides
    Accessibility, How-to, touch targets, web developers, web development, Website Accessibility
  • How to Build Accessible React Applications

    Building an accessible React application means designing a site that everyone, including people with disabilities, can use and enjoy. Accessibility in web apps isn’t just a legal or ethical responsibility—it’s also a best practice that improves user experience for everyone. React, with its dynamic and component-based nature, offers much flexibility, but without careful planning, accessibility can fall through the cracks. This guide will walk you through critical practices to build a more accessible React app, covering essential tools, effective HTML and ARIA usage, keyboard accessibility, and screen reader management.

    Why Accessibility in React Matters

    An accessible React app does not create obstacles for people who rely on assistive technology like screen readers, keyboards, or other devices. According to Web Content Accessibility Guidelines (WCAG), making web content accessible means people of all abilities can navigate, understand, and interact with your content. With tools and techniques tailored for React, you can ensure that users with disabilities get the best experience possible.

    Setting Up an Accessibility-Friendly Development Environment

    Setting up your React environment to catch accessibility issues early is a powerful way to build accessible applications. A highly recommended tool for React is eslint-plugin-jsx-a11y, which catches JSX-specific accessibility issues directly in your code editor.

    Installing eslint-plugin-jsx-a11y

    Install the plugin:

    npm install eslint-plugin-jsx-a11y --save-dev

    Configure ESLint: Add the plugin to your ESLint configuration file.

    {
      "plugins": ["jsx-a11y"],
      "extends": [
        "eslint:recommended",
        "plugin:jsx-a11y/recommended"
      ]
    }

    This plugin identifies accessibility issues in JSX, such as missing ARIA roles, empty <alt> attributes on images, and improper keyboard handling.

    The Power of Semantic HTML in React

    When it comes to accessibility, semantic HTML is your best friend. Semantic elements like <button>, <header>, and <nav> are designed to convey meaning and functionality to both browsers and screen readers. This minimizes the need for ARIA roles and additional attributes, as semantic HTML elements come with built-in keyboard accessibility and screen reader support.

    Examples of Semantic HTML in React

    Using semantic elements directly in React makes components accessible by default. For example:

    import React from 'react';
    function AppHeader() {
      return (
        <header>
          <h1>Welcome to My Store</h1>
          <nav>
            <a href="#home">Home</a>
            <a href="#products">Products</a>
            <a href="#contact">Contact</a>
          </nav>
        </header>
      );
    }
    export default AppHeader;

    Avoid Using <div> and <span> for Interactive Elements

    Avoid using generic elements like <div> and <span> to create buttons or links, as these don’t include native keyboard or accessibility functionality. Instead, use <button> and <a> elements to ensure proper accessibility and functionality. For example:

    function IconButton() {
      return <button aria-label="Open settings" onClick={() => alert('Settings')}>⚙️</button>;
    }

    Enhancing Accessibility with ARIA Roles (But Use Them Wisely)

    ARIA (Accessible Rich Internet Applications) can make custom elements accessible when there’s no HTML equivalent. However, it’s essential to use ARIA roles to enhance existing semantic elements rather than replace them.

    Using aria-label for Accessibility

    Sometimes, buttons or icons need additional context for screen readers. The aria-label attribute provides descriptive text to communicate functionality.

    function IconButton() {
      return <button aria-label="Open settings" onClick={() => alert('Settings')}>⚙️</button>;
    }

    Dynamic Updates with aria-live

    React apps often have dynamic content. Use aria-live regions to notify screen readers about important changes.

    function AlertMessage({ message }) {
      return (
        <div aria-live="assertive">
          {message}
        </div>
      );
    }

    Keyboard Accessibility and Focus Management

    Keyboard accessibility ensures users can navigate your app without a mouse, which is crucial for many assistive technology users. In React, managing keyboard focus is straightforward with hooks like useRef and useEffect.

    Setting Focus with useRef and useEffect

    You can use useRef to target an element and useEffect to set focus when a component mounts. This is useful for elements like modals, which should receive focus when they appear.

    import React, { useRef, useEffect } from 'react';
    function Modal({ isOpen, onClose }) {
      const closeButtonRef = useRef(null);
      useEffect(() => {
        if (isOpen) {
          closeButtonRef.current.focus();
        }
      }, [isOpen]);
      return (
        isOpen && (
          <div role="dialog" aria-modal="true">
            <p>Modal content here</p>
            <button ref={closeButtonRef} onClick={onClose}>Close</button>
          </div>
        )
      );
    }

    In this example, the close button gains focus when the modal opens, making navigation intuitive for keyboard users.

    Avoiding Focus Traps

    Focus traps occur when users get “stuck” within an element, such as a modal, and can’t return to the main content. Ensure that focus can move freely between interactive elements and provide a way to close modals with the Escape key.

    Best Practices for Accessible Interactive Elements

    When building custom components, pay attention to how they’ll be used with a keyboard:

    Provide Clear Labels for Inputs

    Forms are essential in any application, and labeling form controls is critical for accessibility. Use labels effectively with inputs, either through <label> elements or aria-label attributes.

    function NameInput() {
      return (
        <label htmlFor="name">
          Name:
          <input type="text" id="name" aria-required="true" />
        </label>
      );
    }

    Accessible Modals

    For custom modal components, set the role= "dialog" and aria-modal= "true" attributes, which inform assistive technology that the content is a modal.

    Testing Focus

    After adding interactive elements, test that each one can be reached and activated using only the Tab, Enter, and Escape keys. This ensures full keyboard accessibility.

    Managing Screen Reader Navigation in SPAs

    Single Page Applications (SPAs) often update content dynamically without full page reloads, which can make it difficult for screen reader users to keep track of changes. When the main content area updates, shift focus to the new content or provide a way for screen readers to be alerted about the change.

    Example: Setting Focus on Page Updates

    import React, { useEffect, useRef } from 'react';
    function ContentArea({ content }) {
      const contentRef = useRef();
      useEffect(() => {
        contentRef.current.focus();
      }, [content]);
      return (
        <main tabIndex="-1" ref={contentRef}>
          {content}
        </main>
      );
    }

    Here, the main content area receives focus after each update, helping screen reader users navigate SPAs more easily.

    Testing Your React App for Accessibility

    Testing is crucial to ensure your React application meets accessibility standards. Here are some testing methods and tools:

    1. Manual Testing: Use keyboard-only navigation to interact with your app, checking that all elements are accessible and usable. Verify that custom elements respond to the Tab, Enter, and Escape keys.
    2. Screen Readers: Test with a screen reader like NVDA (for Windows) or VoiceOver (for macOS). Experience the app as a screen reader user to see how well content updates and ARIA roles are conveyed.
    3. Automated Tools: Tools like Google Lighthouse or WAVE identify many accessibility issues. They’re helpful for quickly checking common problems, although they don’t replace manual testing.

    Conclusion

    Building accessible React applications takes effort but is entirely achievable with the right techniques and tools. Start by setting up your development environment with eslint-plugin-jsx-a11y to catch common issues, and always prioritize semantic HTML elements for inherent accessibility. ARIA roles are powerful but should be used to enhance—not replace—standard HTML.

    Ensuring keyboard accessibility, managing focus in SPAs, and regularly testing for accessibility can make a world of difference for users. By following these practices, you’re not only meeting WCAG standards but also creating a better user experience for everyone.

    Need help?  Reach out to 216digital using the contact form below for a complimentary ADA briefing.

    Bobby

    November 6, 2024
    How-to Guides
    ARIA, How-to, React, web developers, web development
  • The Importance of Keyboard Accessibility & Why ARIA Widgets Don’t Work

    Keyboard accessibility is a fundamental part of creating an accessible web experience. For many people, including those with motor impairments, the ability to navigate a website using only a keyboard is essential. Unfortunately, not all website interactive elements are designed with keyboard users in mind. This is where ARIA (Accessible Rich Internet Applications) widgets often come into play—intended to improve accessibility but frequently falling short when misused.

    Understanding the principles of keyboard accessibility and the limitations of ARIA widgets can help website owners, developers, and content creators deliver a more inclusive user experience. Let’s explore the most common keyboard accessibility issues, why ARIA widgets often miss the mark, and how you can design your website to meet Web Content Accessibility Guidelines (WCAG) standards.

    Why Keyboard Accessibility Matters

    Keyboard accessibility ensures that all interactive elements on a website—like buttons, forms, links, and menus—are reachable and usable without needing a mouse. Many users, such as those with motor disabilities or vision impairments, rely on keyboards, screen readers, or other assistive devices to navigate web content.

    Without keyboard accessibility, people using assistive technology can encounter significant barriers, preventing them from completing tasks or navigating the site. For instance, a checkout form that only allows interaction through mouse clicks will stop a keyboard user in their tracks, impacting their ability to purchase a product or service.

    Common Barriers to Keyboard Accessibility

    Some of the most common obstacles that keyboard users face on websites include:

    Lack of Focus Indicators

    • Problem: Without visible focus indicators, keyboard users may not know where they are on the page. This becomes particularly frustrating when navigating forms or interactive menus.
    • Solution: Use CSS to style focus indicators and make them highly visible, such as by changing the border color, background, or outline. Here’s an example:
    button:focus, a:focus {
    	outline: 3px solid #005fcc;
    	background-color: #f0f8ff;
    }

    Improper Tab Order

    • Problem: Elements on a page need to logically match the visual layout. Without a logical tab order, users may be taken through an erratic sequence, which can lead to confusion and missed information.
    • Solution: Arrange your elements in HTML to follow the intended visual order and limit use of the tabindex attribute. By default, elements will follow the document’s source order, so it’s best to organize your code this way.

    Focus Traps

    • Problem: Focus traps occur when users can’t tab away from a particular element, like a popup or modal. Once they’re stuck, the rest of the page becomes inaccessible until they can close the focus-trapped section.
    • Solution: Ensure focus returns to the main content once the user dismisses the popup or modal, using JavaScript if necessary:
    // Example of returning focus after modal close
    document.getElementById("closeModalButton").addEventListener("click", function() {
      document.getElementById("mainContent").focus();
    });

    ARIA Widgets and Their Challenges

    ARIA (Accessible Rich Internet Applications) is a set of attributes that help improve the accessibility of web applications, particularly for screen readers. However, ARIA widgets—such as dropdowns, sliders, and modals—often don’t work as expected for keyboard users if not implemented carefully. ARIA can enhance accessibility, but it can’t “fix” poor coding practices or make non-native elements fully functional on its own.

    Why ARIA Widgets Often Fail

    ARIA widgets can be highly effective but only if they’re properly coded, tested, and consistently used with accessibility in mind. Here are some common pitfalls:

    Reliance on ARIA Without Semantic HTML

    ARIA is not a replacement for HTML5 elements; it’s meant to enhance them. Using ARIA on elements that don’t support native keyboard interactions (like <div> for a button) means the widget might lack inherent keyboard functionality.

    For example, instead of creating a clickable div with ARIA, use a <button> tag. Buttons come with native keyboard functionality and don’t require extra scripting or attributes to work as expected.

    Overuse of role and tabindex Attributes

    Misusing role attributes can disrupt how screen readers interact with elements. For instance, assigning a role= "button" to a div won’t make it work the same way as a real button.

    Similarly, improper use of tabindex can cause elements to jump around in an illogical order. Stick to the natural flow of the DOM, using tabindex= "0" only when absolutely necessary to keep the order in sync.

    JavaScript-Dependent Behavior

    ARIA widgets often rely on JavaScript to replicate native interactions, but these scripts must be meticulously coded and tested. A JavaScript error could render an entire widget inaccessible.

    Testing your scripts thoroughly with keyboard-only navigation is essential, especially for ARIA widgets. Missing key events like “Enter” or “Escape” can trap users in a widget or make it difficult to interact with.

    Best Practices for Creating Keyboard-Accessible Interactive Elements

    To avoid these pitfalls and ensure that your site is truly keyboard accessible, follow these best practices:

    Prioritize Native HTML Elements

    Whenever possible, use native HTML elements for interactivity (like <button>, <a>, <input>, and <select>). They come with built-in accessibility and keyboard support, reducing the need for complex ARIA attributes or custom JavaScript.

    Use ARIA Judiciously

    Use ARIA only when there’s no HTML equivalent, like custom dropdowns or sliders. And if you do need ARIA attributes, implement them carefully with an understanding of their purpose. For example, use aria-expanded to indicate the open or closed state of a dropdown menu:

    <button aria-expanded="false" aria-controls="menu">Menu</button>
    <ul id= "menu" hidden>
      <li><a href="#home">Home</a></li>
      <li><a href="#about">About</a></li>
    </ul>

    Enable Logical Focus Management

    Ensure that interactive elements maintain a logical and intuitive focus order. When creating modals or popups, use JavaScript to trap focus within the modal until it’s closed and then return focus to the last element interacted with:

    const modal = document.getElementById("modal");
    const lastFocus = document.activeElement;
    // Trap focus within modal
    modal.addEventListener("keydown", (e) => {
      if (e.key === "Tab") {
        // Logic to keep focus within modal
      }
    });
    // Restore focus after modal close
    modal.addEventListener("close", () => {
      lastFocus.focus();
    });

    Include Skip Links

    Skip links are simple yet effective. They allow keyboard users to jump directly to the main content, bypassing repetitive navigation menus. Add a skip link that appears when focused, like this:

    <a href="#mainContent" class="skip-link">Skip to main content</a>
    <main id="mainContent">
      <!-- Main content here -->
    </main>

    The Importance of Testing for Keyboard Accessibility

    Testing is critical to achieving real keyboard accessibility. Use keyboard-only navigation to interact with your site, ensuring that each element responds to the Tab, Enter, and Escape keys appropriately. Here are a few tips for testing:

    1. Turn Off Your Mouse: Try navigating your site using only the keyboard. See if you can reach every interactive element and complete all tasks.
    2. Use Assistive Technology Simulators: There are free screen readers (such as NVDA or VoiceOver) that let you experience your website as a keyboard-only user would.
    3. Run Accessibility Audits: Automated tools like Google Lighthouse or WAVE can catch many keyboard accessibility issues, but a manual review is still necessary.

    Conclusion

    Keyboard accessibility is a must for ensuring inclusivity on your website. By avoiding ARIA misuse and sticking to native HTML elements where possible, you’ll reduce barriers for keyboard users and create a smoother experience. Remember, ARIA attributes can enhance interactivity, but they aren’t a substitute for accessible design principles.

    Testing with keyboard-only navigation will confirm that your site meets WCAG standards and shows your commitment to creating a web experience that everyone can enjoy—just in time for all your visitors to get the most out of your content and promotions. Reach out to 216digital using the contact form below if you’re unsure if your website is keyboard navigable.

    Bobby

    October 29, 2024
    How-to Guides
    ARIA, How-to, keyboard accessibility, web developers, web development
  • 5 Accessibility Mistakes to Dodge This Holiday Season

    Many eCommerce businesses make most of their income during the holiday shopping season, so your website must perform to the best of its ability during the Black Friday and Cyber Monday promotions. Web Accessibility is probably the last thing on your mind when you’re already in a frenzy to ensure you’re maximizing every visit to your website. However, you may be leaving money on the table or making yourself vulnerable to expensive litigation if you don’t stay diligent with your digital inclusivity.

    For many customers—especially those with disabilities—shopping online is their primary option. If your website isn’t accessible, you’re alienating a significant portion of your audience (up to 20%) and potentially violating the Americans with Disabilities Act (ADA).

    To help you prepare for the holiday rush, let’s go over five common web accessibility mistakes businesses make during holiday promotions and how you can avoid them.

    Insufficient Alt Text for Images

    Holiday promotions often rely on eye-catching images, banners, and product displays. However, if those images lack appropriate alt text, customers using screen readers won’t be able to understand their content. Alt text (short for alternative text) provides a textual description of an image that’s accessible to screen reader users.

    Why It Matters

    Alt text is essential for individuals with visual impairments. If a visually impaired customer is browsing your site and encounters an image without a proper description, they’ll have no idea what’s being displayed. Imagine running a huge Black Friday sale, but your best deals are hidden from a portion of your audience simply because your images aren’t described.

    How to Fix It

    As you add promotional banners and products to the website, always make sure you’re adding alt text to the images. Here’s an example:

    <img src=" winter-sale-banner.jpg" alt=" Banner for Winter Sale - Up to 50% off jackets and coats">

    Do not use image file names or vague text such as “sale-img” or “Sale Image”. Make sure the alt text contains enough information that the user understands the purpose of the image and contains any words that appear on the image.

    Poor Color Contrast

    With holiday promotions comes festive design—bright colors, eye-catching buttons, and themed decorations. While these designs may look great, they often fail color contrast standards. Having adequate color contrast is not only good for color-blind users, but it also makes the website easier for everyone to navigate.

    Why It Matters

    According to WCAG, the minimum contrast ratio between text and background should be at least 4.5:1 for normal text and 3:1 for larger text. When the contrast is too low, customers with low vision or color blindness may struggle to read important information, such as product details or discount codes.

    How to Fix It

    Use tools like the WebAIM Contrast Checker to ensure your color choices meet the WCAG contrast ratio guidelines. For example, a light gray text on a white background will likely fail the contrast test, but switching to a darker gray or black can make a big difference.

    Here’s an example of a common mistake and how to correct it:

    <!-- Poor contrast -->
    <p style="color: #cccccc; background-color: #ffffff;">50% off all products!</p>
    <!-- Better contrast -->
    <p style="color: #000000; background-color: #ffffff;">50% off all products!</p>

    Pay attention to your text color, button colors, and even the contrast of smaller elements like icons.

    InaccessibleNavigation and Controls

    Most store owners don’t consider that some users do not navigate their website with a mouse. Even some users without disabilities prefer to use other input methods to quickly navigate some sections of your website.

    Why It Matters

    Blind and motor-impaired users rely on the keyboard, gestures, or voice commands to navigate your website. If your navigation, contact forms, category filters, and product pages are not properly coded to support these input methods, these users will be denied equal access to the website and may not be able to make a purchase with you at all, losing you a valuable customer and potentially damaging your reputation.

    How to Fix It

    Regularly test the functional portions of your website with a keyboard. Attempt to start at the homepage, navigate to a category page, use the category filters, add/remove product quantities, and select product options without your mouse. If you encounter a problem with an element, it’s likely not coded using the correct element. You can force an element to receive keyboard focus using the tabindex attribute. The role="button" attribute will help users navigating with assistive technology better understand the purpose of the control:

    <span class="swatch-button" tabindex="0" role="button">Beige</span>

    Better yet, use the correct semantic HTML tag to accomplish this:

    <button class="swatch-button">Beige</button>

    Semantic HTML helps users relying on assistive technology understand the purpose of controls and also helps Google better understand the structure of your website:

    <nav>
    	<a href="/products">All products</a>
    	<a href="/products/sale">Sale products</a>
    	<a href="/contact">Contact Us</a>
    </nav>

    Missing Captions on Promotional Videos

    Videos are an excellent way to showcase products, promote deals, or explain services during the holiday season. However, many businesses forget to include captions, making the content inaccessible to users who are deaf or hard of hearing.

    Why It Matters

    Videos contain a lot of important information in the form of spoken words and visual cues. Both blind and deaf users rely on accessible closed captions (not just subtitles) to understand the content of the video. Also, some users may be in noisy environments and are unable to hear the video.

    How to Fix It

    Most popular video platforms have auto-captioning features, but these tend to just subtitle the video rather than create truly accessible closed captions. There are many cheap and easy closed captioning services, such as Rev.com, that have quick turnarounds.

    Here’s how you implement closed captions from an external service:

     <video controls>
      <source src="promo-video.mp4" type="video/mp4">
      <track kind="captions" src="captions_en.vtt" srclang="en" label="English">
      Your browser does not support the video tag.
    </video>

    Always test the captions to make sure they sync properly with the video and cover both spoken dialogue and important sound effects.

    Over-reliance on Automated Accessibility Overlays

    It might seem tempting to use automated accessibility overlays, especially during the hectic holiday season. These are often marketed as one-click solutions to make your website accessible. The Department of Justice has issued clear guidance that these solutions are inadequate in addressing web accessibility, and they may get you targeted with litigation.

    Why It Matters

    Automated accessibility overlays claim to fix all accessibility issues on a website, but they usually fail to address the root problems. Blind users are outspoken that they dislike these solutions as they tend to interfere with the assistive technologies they’re already comfortable with. We’ve also seen these solutions specifically called out in lawsuits as a reason for being targeted.

    How to Fix It

    The best way to ensure your site is accessible is by addressing the core issues in your code and design. Automated tools can help identify problems, but manual reviews and fixes are essential. Invest in manual audits and focus on meeting the WCAG guidelines through thoughtful design and coding practices.

    Here’s an example of using a reliable method instead of relying on an

    <!-- Instead of using an overlay for images, provide clear alt text -->
    <img src= "holiday-product.jpg" alt= "Red winter coat with a 30% off discount tag">

    Automated tools tend to use AI to label images and controls and often misrepresent content on the website, leading to a potentially overtly harmful experience.

    Conclusion

    As you gear up for holiday promotions, make sure accessibility is at the top of your checklist. By avoiding these common mistakes—insufficient alt text, poor color contrast, inaccessible navigation, missing captions, and over-reliance on automated tools—you’ll ensure that your website is welcoming and easy to use for everyone.

    Not only does improving web accessibility help you reach a wider audience, but it also protects your business from legal risks and ensures compliance with WCAG and ADA standards. Taking the time to implement these changes now will pay off during the holiday rush and beyond.

    If you’re unsure about the accessibility of your site, reach out to 216digital using the contact form below for a free evaluation.

    Bobby

    October 21, 2024
    How-to Guides, Legal Compliance
    holiday promotions, How-to, web development, Website Accessibility
Previous Page
1 2 3 4 5
Next Page
216digital Scanning Tool

Audit Your Website for Free

Find Out if Your Website is WCAG & ADA Compliant













    216digital Logo

    Our team is full of expert professionals in Web Accessibility Remediation, eCommerce Design & Development, and Marketing – ready to help you reach your goals and thrive in a competitive marketplace. 

    216 Digital, Inc. BBB Business Review

    Get in Touch

    2208 E Enterprise Pkwy
    Twinsburg, OH 44087
    216.505.4400
    info@216digital.com

    Support

    Support Desk
    Acceptable Use Policy
    Accessibility Policy
    Privacy Policy

    Web Accessibility

    Settlement & Risk Mitigation
    WCAG 2.1/2.2 AA Compliance
    Monitoring Service by a11y.Radar

    Development & Marketing

    eCommerce Development
    PPC Marketing
    Professional SEO

    About

    About Us
    Contact

    Copyright 2024 216digital. All Rights Reserved.