<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Jason Webb</title>
    <description>The latest articles on Forem by Jason Webb (@jasonwebb).</description>
    <link>https://forem.com/jasonwebb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F318057%2Fda96f803-58be-4618-a67e-69927e7cf418.jpeg</url>
      <title>Forem: Jason Webb</title>
      <link>https://forem.com/jasonwebb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jasonwebb"/>
    <language>en</language>
    <item>
      <title>How to build a more accessible carousel or slider</title>
      <dc:creator>Jason Webb</dc:creator>
      <pubDate>Tue, 25 May 2021 19:09:26 +0000</pubDate>
      <link>https://forem.com/jasonwebb/how-to-build-a-more-accessible-carousel-or-slider-35lp</link>
      <guid>https://forem.com/jasonwebb/how-to-build-a-more-accessible-carousel-or-slider-35lp</guid>
      <description>&lt;p&gt;Carousels! They aren’t &lt;a href="https://erikrunyon.com/2013/01/carousel-interaction-stats/" rel="noopener noreferrer"&gt;effective&lt;/a&gt; or &lt;a href="https://www.nngroup.com/articles/auto-forwarding/" rel="noopener noreferrer"&gt;popular&lt;/a&gt; with real users, and yet they can be found all over the web. Often the result of competing internal priorities, carousels might be thought of as a manifestation of unclear business goals or unresolved internal conflicts.&lt;/p&gt;

&lt;p&gt;Regardless of why they are used, one thing is practically universal — &lt;strong&gt;carousels are almost always inaccessible to disabled users&lt;/strong&gt;. In this article we’ll look at common accessibility barriers found in carousels, talk through some good solutions, and then connect you with some practical resources you can start using &lt;strong&gt;right now&lt;/strong&gt; to make your carousels more accessible!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a carousel, anyway?
&lt;/h2&gt;

&lt;p&gt;Those of us who design or build web experiences can usually spot a carousel from a mile (or kilometer) away. They are a region of the page that acts sort of like a slideshow, allowing users to move through a bunch of content that would normally not be possible to fit into that same amount of space.&lt;/p&gt;

&lt;p&gt;Carousels vary quite a bit in their use cases, features, and implementations, which can make it pretty difficult to come up with a precise, universal definition. What we can do, though, is list out the most common characteristics they can have, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;May have one or more slides visible at a time.&lt;/li&gt;
&lt;li&gt;May have slides that contain simple content (like a single image each) or complex content (like form fields and tooltips and all sorts of other complicated things).&lt;/li&gt;
&lt;li&gt;May have controls to navigate to previous and next slides.&lt;/li&gt;
&lt;li&gt;May have controls to jump to specific slides.&lt;/li&gt;
&lt;li&gt;May automatically advance through slides all on its own, at whatever pace the owners felt like using.&lt;/li&gt;
&lt;li&gt;May be oriented horizontally, vertically, or even in 3D!&lt;/li&gt;
&lt;li&gt;May wrap its slides around when a user tries to move past the end or beginning of the set (sometimes called “infinite scrolling”).&lt;/li&gt;
&lt;li&gt;May visually emphasize a single slide to show that it is “active”.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common accessibility issues in carousels
&lt;/h2&gt;

&lt;p&gt;Although carousels can vary quite a bit in their features and implementations, there are a few things that they consistently get wrong for accessibility. Through extensive live user testing with native screen reader and keyboard-only users at &lt;a href="https://accessible360.com/" rel="noopener noreferrer"&gt;Accessible360&lt;/a&gt; across hundreds of websites, we find the following issues over and over again:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Screen reader users very often don’t know when their virtual cursor enters or leaves a carousel, making it difficult for them to know that it even exists or how to get out of it.&lt;/li&gt;
&lt;li&gt;Nearly every carousel is built differently (even if they look the same), so screen reader users can have a tough time building up a consistent mental model that makes carousels easier to navigate later on.&lt;/li&gt;
&lt;li&gt;Many carousels do not hide their non-visible slides from all users, forcing keyboard and screen reader users to go through every single piece of content in them, even though mouse users don’t have to.&lt;/li&gt;
&lt;li&gt;Semantic &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; tags are often not used for actionable elements like the previous, next, and slide dot controls, so keyboard and screen reader users often aren’t able to reach, understand, and activate them.&lt;/li&gt;
&lt;li&gt;Inaccessible icons are often used, usually without human-readable accessible names, which can make controls unusable for screen reader and voice input users.&lt;/li&gt;
&lt;li&gt;If the carousel automatically advances, keyboard and screen reader users can be constantly tossed around in the DOM, unable to make sense of the content that keeps shifting in front of them. Auto-rotation can also be very distracting and disruptive for people with cognitive conditions that affect their attention or memory.&lt;/li&gt;
&lt;li&gt;Sometimes carousels come with hidden keyboard commands, like using the arrow keys to move between slides. But since carousel implementations are not really standardized, these commands will really just confuse real keyboard users, since there is really no reason to expect them to be there.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Key elements of an accessible carousel
&lt;/h2&gt;

&lt;p&gt;At the moment, there is nothing in the &lt;a href="https://html.spec.whatwg.org/" rel="noopener noreferrer"&gt;HTML specification&lt;/a&gt; that really resembles a carousel, so defining how an accessible carousel “should” be built is tricky. The W3C’s WAI-ARIA Working Group has provided a &lt;a href="https://www.w3.org/TR/wai-aria-practices-1.1/#carousel" rel="noopener noreferrer"&gt;design pattern in their WAI-ARIA Authoring Practices 1.1 guide&lt;/a&gt; with some good guidance, but the group has also published a &lt;a href="https://www.w3.org/WAI/tutorials/carousels/" rel="noopener noreferrer"&gt;tutorial with some different guidance&lt;/a&gt;, which tends to be a bit confusing if you aren’t deeply involved in the accessibility scene. (Hopefully this’ll improve, though! See issues &lt;a href="https://github.com/w3c/wai-tutorials/issues/594" rel="noopener noreferrer"&gt;#594&lt;/a&gt; and &lt;a href="https://github.com/w3c/aria-practices/issues/1167" rel="noopener noreferrer"&gt;#1167&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;At &lt;a href="https://accessible360.com/" rel="noopener noreferrer"&gt;Accessible360&lt;/a&gt;, our team of expert accessibility auditors, which includes native screen reader, keyboard, and other AT users, has been carefully crafting and iteratively refining a practical approach to carousels that we use to guide our clients towards WCAG conformance in a clear, consistent way. The approach that we’ve developed has a lot in common with this example from the WAI-ARIA Authoring Practices design pattern, and uses the following criteria:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use the &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; tag (or &lt;code&gt;role="region"&lt;/code&gt;) with a generic &lt;code&gt;aria-label&lt;/code&gt; (like &lt;code&gt;aria-label="hero carousel"&lt;/code&gt;) for the wrapper element so screen reader users know exactly where the carousel starts and ends in the DOM.&lt;/li&gt;
&lt;li&gt;Add simple instructions for screen reader users to explain how the carousel is set up and how it works. This isn’t required for WCAG conformance, but until carousels become more standardized, instructions can help screen reader users build up a useful mental model.&lt;/li&gt;
&lt;li&gt;When a slide is not visible on the screen, it should be hidden from all users either using CSS (like &lt;code&gt;display: none&lt;/code&gt; or &lt;code&gt;visibility: hidden&lt;/code&gt;), the HTML &lt;code&gt;hidden&lt;/code&gt; attribute, or by adding &lt;code&gt;aria-hidden="true"&lt;/code&gt; to the slide’s wrapper and &lt;code&gt;tabindex="-1"&lt;/code&gt; to all the focusable elements inside it. FYI — that last technique is the most animation-friendly.&lt;/li&gt;
&lt;li&gt;Avoid using list markup for the slides. Screen readers announce how many list items are in each list, but ignores list items that are hidden. If you are truly hiding the slides that aren’t visible (see previous point), then the number of list items announced to a user won’t match the true number of slides. Also, most screen readers don’t tell users which list item they are currently on, or when they enter or exit one (the next point will cover that!), so this markup isn’t especially useful in this use case.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;role="group"&lt;/code&gt; and a numbered &lt;code&gt;aria-label&lt;/code&gt; (like &lt;code&gt;aria-label="slide 1 of 8"&lt;/code&gt;) on the wrapper of each individual slide so screen reader users can easily tell where each slide begins and ends and where they are in the set.&lt;/li&gt;
&lt;li&gt;Use semantic button elements with clear accessible names for all interactive controls, like the previous/next buttons and slide navigation dots.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;aria-current="true"&lt;/code&gt; on the button of the slide dot corresponding to the currently-active slide so that screen reader users are informed.&lt;/li&gt;
&lt;li&gt;Don’t use custom keyboard controls, like arrow keys for navigation. These just confuse real keyboard users, and are probably going to be missed entirely by screen reader users since they already use their arrow keys for navigating with their virtual cursor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disable autoplay&lt;/strong&gt; — &lt;a href="https://www.w3.org/WAI/WCAG21/Understanding/pause-stop-hide.html" rel="noopener noreferrer"&gt;nobody actually likes it&lt;/a&gt;, and for some users this can be an absolute blocker! If you’re not in a position to say “no”, then you can at least minimize the harm by adding a pause or stop button to meet &lt;a href="https://www.w3.org/WAI/WCAG21/Understanding/pause-stop-hide.html" rel="noopener noreferrer"&gt;WCAG 2.2.2&lt;/a&gt;. But keep in mind, just because something conforms to WCAG doesn’t mean people will actually enjoy using it!&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Try it out for yourself!
&lt;/h2&gt;

&lt;p&gt;If you’re like me, nothing beats a live code sample to help really understand a complex component like this. So let’s take a look at what a “good” and “bad” carousel could actually look like, and do a little testing to see how each problem can resolved with the solutions above.&lt;/p&gt;

&lt;h3&gt;
  
  
  ❌ Bad carousel
&lt;/h3&gt;

&lt;p&gt;In this carousel, Murphy’s Law has taken over! Using the criteria above, see if you can spot all the things that are wrong with this. Be sure to use your keyboard and a screen reader, like NVDA or VoiceOver! Here are a few prompts to guide you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can you tell when you enter the carousel and when you leave it using a screen reader?&lt;/li&gt;
&lt;li&gt;Can you reach all the controls with your keyboard?&lt;/li&gt;
&lt;li&gt;Are you able to figure out what each control does based on what your screen reader says?&lt;/li&gt;
&lt;li&gt;Can you reach content in the slides that are supposed to be hidden?&lt;/li&gt;
&lt;li&gt;Can you tell which slide you are on using only your screen reader?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/A360/embed/f6d7fad063e701b87aee6c5ed5335581?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  ✔️ Good carousel
&lt;/h3&gt;

&lt;p&gt;Now let’s take a look at a carousel that looks and feels exactly the same, but uses more accessible code. Compare it to the “bad carousel” example above, and be sure to also use your keyboard and a screen reader to experience it in different ways!&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/A360/embed/04ef4c06349f32d876b9c2bb639bbbbb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Accessible boilerplates for common carousel packages
&lt;/h2&gt;

&lt;p&gt;Knowing what makes a carousel “good” or “bad” for accessibility is all well and good, but actually putting that knowledge into practice in the real world might be easier said than done!&lt;/p&gt;

&lt;p&gt;In the real world, most of us devs use third-party, open source packages like Slick Slider or Flickity whenever we need a carousel, which adds another layer of complexity that makes it even harder to deliver accessible experiences. Unfortunately, many of these packages have either been &lt;a href="https://github.com/kenwheeler/slick/graphs/contributors" rel="noopener noreferrer"&gt;abandoned&lt;/a&gt; or have communities that are so large and ad-hoc that forward progress is a real challenge.&lt;/p&gt;

&lt;p&gt;Luckily, most of these packages provide APIs that you can use to make adjustments for accessibility at specific times, like adding ARIA attributes or using custom elements for controls. But since each API and package is a little bit different, it takes time to read through the developer docs and figure it all out.&lt;/p&gt;

&lt;p&gt;Wouldn’t it be great if there was a repository of ready-to-go code snippets for popular carousel packages that you could drop into your project to make them more accessible and save you some time? Well, we thought so too, which is why we’ve been building out a set of consistent code samples for common use cases that you can start using &lt;strong&gt;right now&lt;/strong&gt;! You can get these samples at either of the following places (the samples are the same!):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Github repo:
&lt;a href="https://github.com/Accessible360/accessible-carousel-boilerplates" rel="noopener noreferrer"&gt;https://github.com/Accessible360/accessible-carousel-boilerplates&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CodePen collection:
&lt;a href="https://codepen.io/collection/narjZO" rel="noopener noreferrer"&gt;https://codepen.io/collection/narjZO&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There you’ll find realistic code snippets for hero banners, linked product cards, tiles with quick view popups, and even PDP product images with a carousel of thumbnails. So far, code snippets have been created for accessible-slick, Flickity, Owl Carousel 2, Slick Slider, and Splide. To request snippets for other packages or use cases, feel free to &lt;a href="https://github.com/Accessible360/accessible-carousel-boilerplates/issues" rel="noopener noreferrer"&gt;open an issue on the Github repo&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Here is just one of these examples, which uses &lt;a href="https://github.com/Accessible360/accessible-slick" rel="noopener noreferrer"&gt;accessible-slick&lt;/a&gt; (a highly accessible Slick Slider fork built by Accessible360) to implement a responsive product tile slider with “quick view” modal dialogs:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/A360/embed/KKaWyYV?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Credits
&lt;/h2&gt;

&lt;p&gt;The research and code snippets in this article are provided by &lt;a href="https://accessible360.com/" rel="noopener noreferrer"&gt;Accessible360&lt;/a&gt;, whose expert accessibility engineers were invaluable with their insight, feedback, and time on this topic.&lt;/p&gt;

&lt;p&gt;If your company is looking for an accessibility partner to help bring your product to the next level through live user audits, monitoring, training, or remediation support, then get in touch today!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://accessible360.com" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuqw128p3khcm6rd4kjzj.png" alt="Go to Accessible360.com"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.nngroup.com/articles/auto-forwarding/" rel="noopener noreferrer"&gt;Auto-Forwarding Carousels and Accordions Annoy Users and Reduce Visibility&lt;/a&gt; by Jakob Nielsen via Nielsen Norman Group&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.nngroup.com/articles/designing-effective-carousels/" rel="noopener noreferrer"&gt;Carousel Usability: Designing an Effective UI for Websites with Content Overload&lt;/a&gt; by Kara Pernice via Nielsen Norman Group&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://shouldiuseacarousel.com/" rel="noopener noreferrer"&gt;ShouldIUseACarousel.com&lt;/a&gt; by Jared Smith&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.creativebloq.com/accessibility-expert-warns-stop-using-carousels-7133778" rel="noopener noreferrer"&gt;Accessibility expert warns: stop using carousels&lt;/a&gt;. Interview with Jared Smith by Creative Bloq&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.sitepoint.com/unbearable-accessible-slideshow/" rel="noopener noreferrer"&gt;The Unbearable Inaccessibility of Slideshows&lt;/a&gt; by Gian Wild&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://erikrunyon.com/2013/01/carousel-interaction-stats/" rel="noopener noreferrer"&gt;Carousel Interaction Stats&lt;/a&gt; by Erik Runyon&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>a11y</category>
      <category>webdev</category>
      <category>carousel</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How I built an accessible IoT dashboard</title>
      <dc:creator>Jason Webb</dc:creator>
      <pubDate>Sun, 02 Feb 2020 16:15:41 +0000</pubDate>
      <link>https://forem.com/jasonwebb/how-i-built-an-accessible-iot-dashboard-clh</link>
      <guid>https://forem.com/jasonwebb/how-i-built-an-accessible-iot-dashboard-clh</guid>
      <description>&lt;p&gt;The IoT has incredible potential for changing the way we interact with the world around us. We all know that it’s a game-changer for home automation, sensor data acquisition/management, and industrial applications, but what about for the people using these systems?&lt;/p&gt;

&lt;p&gt;When you think about it, the IoT is not just about building devices that communicate at a distance — it’s also about creating digital interfaces to the world around us. When built well, these interfaces can be used by &lt;strong&gt;anybody&lt;/strong&gt; to interact remotely with objects that they may not be able to otherwise.&lt;/p&gt;

&lt;p&gt;We hear a lot about the business and technical reasons why remote monitoring and management are helpful — maybe the devices are too far away, or in an extreme environment, or there are simply too many to keep track of any other way. But as it turns out, there are also all sorts of human reasons for remote access too!&lt;/p&gt;

&lt;p&gt;Consider someone with low or no vision who wants to check their mailbox for mail, or find out how much time is left for a load of laundry, or see if their oven has reached a set temperature. While they more than likely have adaptive strategies for performing these tasks, those are usually very time-consuming and tedious. Imagine how much easier it would be if they could find out all of this information in just a matter of minutes using a web interface!&lt;/p&gt;

&lt;p&gt;These situations are more common than you might realize. &lt;a href="https://www.census.gov/newsroom/releases/archives/miscellaneous/cb12-134.html" rel="noopener noreferrer"&gt;Nearly 1 in 5 people in the US experience some form of disability&lt;/a&gt;, and nearly &lt;strong&gt;everyone&lt;/strong&gt; has experienced (or knows someone who has) temporary or situational impairments that make it hard to use our favorite “things” and digital interfaces. May you’ve experienced nausea or vertigo while recovering from a medical procedure, or needed to find answers fast during an emergency situation, or even just run out of power on your wireless mouse!&lt;/p&gt;

&lt;p&gt;When we build accessible web interfaces we aren’t just tacking on specialized features for edge cases — we’re creating clean, intuitive experiences that we can all understand and use more easily with whatever devices, inputs, and skills are available to us!&lt;/p&gt;

&lt;h2&gt;
  
  
  A Dashboard for Everybody!
&lt;/h2&gt;

&lt;p&gt;So what would a clean, intuitive, and accessible interface for an IoT project look like? As part of &lt;a href="https://iothackday2019.devpost.com/" rel="noopener noreferrer"&gt;IoT Hack Day 2019&lt;/a&gt;, a full-day hackathon in Saint Paul, MN, I captained a team to create a speculative sample dashboard to demonstrate some design and development techniques that any IoT interface can use, which I hope helps answer that question.&lt;/p&gt;

&lt;p&gt;In this article, we’ll dive into some of the most important accessibility features and techniques used in the dashboard, but if you’d like to dive right in you can play with it right now using randomized mock data here: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://jasonwebb.github.io/dashboard-for-everybody/dashboard" rel="noopener noreferrer"&gt;https://jasonwebb.github.io/dashboard-for-everybody/dashboard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fccdm3rt6828bfj5umvgg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fccdm3rt6828bfj5umvgg.png" alt="Full page screenshot of the dashboard showing controls, live chart of data, data highlights, and one trigger set up" width="800" height="579"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Get the source code!
&lt;/h3&gt;

&lt;p&gt;All of the code for this project is &lt;a href="https://github.com/jasonwebb/dashboard-for-everybody" rel="noopener noreferrer"&gt;available for free over on Github&lt;/a&gt; under the MIT license. This means that you are completely free to use it, remix it, and integrate it into your project (even commercially).&lt;/p&gt;

&lt;p&gt;Just keep in mind that it was built as part of a hackathon, and is mainly meant to be an educational resource and a proof-of-concept, not a production-ready package 😄&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/jasonwebb" rel="noopener noreferrer"&gt;
        jasonwebb
      &lt;/a&gt; / &lt;a href="https://github.com/jasonwebb/dashboard-for-everybody" rel="noopener noreferrer"&gt;
        dashboard-for-everybody
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Demo project of a real-time data dashboard showing effective design and dev techniques for making complex interfaces accessible for people with disabilities
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;And be sure to check out this sweet one-page documentation too: &lt;a href="https://jasonwebb.github.io/dashboard-for-everybody/" rel="noopener noreferrer"&gt;https://jasonwebb.github.io/dashboard-for-everybody/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview of accessibility features
&lt;/h2&gt;

&lt;p&gt;A number of design and code techniques are used to make the dashboard experience easy and intuitive for most people, all based on the four guiding principles of the &lt;a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/intro.html#introduction-fourprincs-head" rel="noopener noreferrer"&gt;Web Content Accessibility Guidelines&lt;/a&gt; (WCAG).&lt;/p&gt;

&lt;p&gt;Simply put, these principles (POUR) define four high-level criteria for how content on the web should be built to be considered accessible. All content should be &lt;strong&gt;p&lt;/strong&gt;erceivable, &lt;strong&gt;o&lt;/strong&gt;perable, &lt;strong&gt;u&lt;/strong&gt;nderstandable, and &lt;strong&gt;r&lt;/strong&gt;obust for all users using the tools and abilities available to them.&lt;/p&gt;

&lt;p&gt;The main techniques and features that were implemented to meet these criteria include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fully operable via keyboard&lt;/strong&gt; using native elements as much as possible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chart data&lt;/strong&gt; is available to people using screen readers through visually-hidden tables.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic, valid HTML&lt;/strong&gt; is used extensively to provide a great user experience for people using screen readers to navigate.&lt;/li&gt;
&lt;li&gt;Important asynchronous information (like the availability of input and output devices) is &lt;strong&gt;announced through live regions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;All focusable and interactive elements have strong, consistent &lt;strong&gt;focus indicators&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;All panels have &lt;strong&gt;headings&lt;/strong&gt;, even if they are visually hidden, so that people using screen readers can traverse the page quickly and easily.&lt;/li&gt;
&lt;li&gt;Conforms to &lt;a href="https://www.w3.org/TR/WCAG20/" rel="noopener noreferrer"&gt;WCAG 2.0 (level AA)&lt;/a&gt; guidance.&lt;/li&gt;
&lt;li&gt;Works great on &lt;strong&gt;mobile devices and tablets&lt;/strong&gt;, which are very popular among people with mobility and visual conditions.&lt;/li&gt;
&lt;li&gt;The display of live data can be &lt;strong&gt;paused&lt;/strong&gt; or &lt;strong&gt;slowed down&lt;/strong&gt; so that people using screen readers or with cognitive conditions (like dyslexia) can take all the time they need.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Automated scan reports
&lt;/h3&gt;

&lt;p&gt;Although &lt;a href="https://alphagov.github.io/accessibility-tool-audit/" rel="noopener noreferrer"&gt;woefully imperfect&lt;/a&gt;, automated scanning tools can be used to get a very basic sense of accessibility and check for the most obvious of issues like invalid or inappropriate markup usage and (some) color contrast errors.&lt;/p&gt;

&lt;p&gt;Automated tools do not, and arguably cannot, identify &lt;a href="https://www.matuzo.at/blog/building-the-most-inaccessible-site-possible-with-a-perfect-lighthouse-score/" rel="noopener noreferrer"&gt;critical usability problems&lt;/a&gt; like how easy or pleasant your site is to use for people with disabilities. They are also not good at testing dynamic content or interaction states, or for checking for important best practices like the all-important &lt;a href="https://www.w3.org/TR/wai-aria-practices-1.1/#no_aria_better_bad_aria" rel="noopener noreferrer"&gt;“No ARIA is better than Bad ARIA” principle&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So use them, but don’t rely on them! Just because a page has a perfect audit score doesn’t mean it’s fully and perfectly accessible — it just means that some of the most obvious problems seem to be resolved.&lt;/p&gt;

&lt;p&gt;For example, this dashboard passes all the major scanning tool with perfect scores (see the screenshots below), but there is almost certainly work to be done to improve overall user experience!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ny8hsXvV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/gjs25hh0yzwuhjv3ly4i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ny8hsXvV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/gjs25hh0yzwuhjv3ly4i.png" alt="Screenshots of perfect scores in each of the major automated scanning tools. From left to right: Chrome’s Lighthouse, WebAIM’s WAVE, and axe.&amp;lt;br&amp;gt;
" width="800" height="234"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Accessibility techniques used
&lt;/h2&gt;

&lt;p&gt;Now let’s take a closer look at the most important and helpful techniques used to make the dashboard accessible:&lt;/p&gt;
&lt;h3&gt;
  
  
  Focus indication
&lt;/h3&gt;

&lt;p&gt;When designing and building any web project, don’t forget about the humble &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:focus" rel="noopener noreferrer"&gt;focus state&lt;/a&gt;! Great focus indicators make a world of difference for keyboard-only users and are absolutely essential for people with low vision (see &lt;a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-focus-visible.html" rel="noopener noreferrer"&gt;WCAG S.C. 2.4.7&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Let’s be real. The &lt;a href="https://allyjs.io/tests/focus-outline-styles/#style=focus&amp;amp;key=text,radio,checkbox,textarea,button,link,div&amp;amp;browser=firefox,chrome,safari,ie11" rel="noopener noreferrer"&gt;default focus indicators provided by browsers&lt;/a&gt; are not always very effective or attractive, especially when different foreground and background colors or background images or videos are used. As a result, it's not uncommon for popular design frameworks, style resets, and normalizers to remove them entirely — not cool! If you’re going to remove the browser’s default focus indicators, &lt;strong&gt;you should provide an even better one!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the sample dashboard project, the following techniques are used to improve focus indication for all users:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Strong, consistent focus rings are added around all interactive elements, like buttons and input fields.&lt;/li&gt;
&lt;li&gt;Label text next to radio buttons change colors and gets bolder to make it extra clear when they receive focus.&lt;/li&gt;
&lt;li&gt;Panels (the white container boxes) get a stronger border when something inside of them receives focus. This is not really necessary, but I thought it might be helpful to subtly draw the eye to the general region of the page that is “active” — this is probably more speculative than functional.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxowcgxydu0lp21nyqjw6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxowcgxydu0lp21nyqjw6.png" alt="Screenshot of a strong blue focus ring around a select dropdown" width="586" height="328"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Making charts accessible
&lt;/h3&gt;

&lt;p&gt;Charts are notoriously difficult to make accessible, but there are a couple of effective strategies that can be used in nearly every situation.&lt;/p&gt;

&lt;p&gt;First, take a good look at your chart and really think about whether all the features being used actually improve understanding for most users. Your charting library probably provides all sorts of cool, interactive doo-dads like hoverable content, animations, and quirky chart types — but how many of them are really facilitating a better understanding of the data, and how many are just fun to play with? Simpler charts are easier to grok for everyone — remember the &lt;a href="https://en.wikipedia.org/wiki/KISS_principle" rel="noopener noreferrer"&gt;KISS principle&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmtufbd08g340zsbtyqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmtufbd08g340zsbtyqw.png" alt="Screenshot of the dashboard DOM in DevTools, with highlights for the chart and visually-hidden table elements" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Second, remember that every chart is ultimately a visualization of tabular data. There may be a lot of data, and it may be spread across multiple sets and sources, but at the end of the day its all just a bunch of rows and columns. This is exactly what good old HTML &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt;s are meant for, and they actually come with some really neat functionality for people using screen users! So rather than trying to make the charts themselves accessible (which may not be possible depending on the charting library), consider providing the same data in a visually-hidden table and hiding the visual chart using &lt;code&gt;aria-hidden="true"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A word of caution, though: if your chart includes necessary custom keyboard or mouse functionality (like tooltips), a visually-hidden table won’t help keyboard-only users who have vision. Again, ask yourself, “Is this functionality &lt;em&gt;really&lt;/em&gt; necessary?” If so, provide an alternative and obvious mechanism that can be used to activate that same functionality using only the keyboard.&lt;/p&gt;
&lt;h3&gt;
  
  
  Working with live data
&lt;/h3&gt;

&lt;p&gt;Fast-moving live data, especially when it comes from real-time devices, can be overwhelming for people with certain visual or cognitive conditions. Many times we can’t slow down the actual data streams, but we can provide some control over how quickly this data is displayed in the UI.&lt;/p&gt;

&lt;p&gt;In this dashboard we provide two mechanisms to help people control the rate of change of the UI for easier processing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Users can &lt;strong&gt;pause or resume&lt;/strong&gt; the display of live data using a large, clearly-labeled button&lt;/li&gt;
&lt;li&gt;Users can &lt;strong&gt;choose the update interval&lt;/strong&gt; of the UI using a dropdown, giving them more time between updates to process the changes.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Announcing important asynchronous events using live regions
&lt;/h3&gt;

&lt;p&gt;When working with real-world systems, sometimes things happen that disrupt the “normal” user flow — servers go down, devices go offline, connections degrade or get throttled, and so on. For visual users, dashboards are fantastic for monitoring the status of many sub-systems all at once, but what about people who rely on inherently linear tools like screen readers?&lt;/p&gt;

&lt;p&gt;When asynchronous events happen, the importance of the event is usually indicated by the “severity” of the notification. Minor events might just cause a change in a color or a word somewhere, whereas major events might trigger a prompt, an audio cue, or some sort of big, scary visual indication that draws the eye.&lt;/p&gt;

&lt;p&gt;For people using screen readers, minor events can be indicated using clear changes in the text, which they will find organically as they traverse the page. Sometimes it’s tempting to keep this text visually-hidden while only display a change of color or shape for visual users, but this is not the best solution given how important visual text is for people with limited vision (like colorblindness) and people with cognitive conditions.&lt;/p&gt;

&lt;p&gt;Major, disruptive events (like a device going offline) may be indicated to screen readers using &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions" rel="noopener noreferrer"&gt;ARIA live regions&lt;/a&gt;. These are DOM elements that have been marked in such a way that tells screen readers to “watch” for changes that occur to their inner content and be ready to read those changes out when they happen. &lt;strong&gt;This technique should be used very sparingly&lt;/strong&gt; because it can interrupt and even surprise screen reader users as they are going about their business. But if the event is important enough, they’d rather be surprised when it happens than be frustrated when they realize the form they just filled out is pointless!&lt;/p&gt;

&lt;p&gt;Live regions and how they are experienced are much easier to understand when you actually, well, experience them. This short demo video from Udacity does a good job of showing both how live regions are created, and how they are experienced through a screen reader: &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/BLlJRVyS2UM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Making dynamic UI updates
&lt;/h3&gt;

&lt;p&gt;Not all changes to the UI need to interrupt the user flow. Often context and good content practices are enough to indicate to screen reader users that something is about to happen or can happen, and no special coding is required to guide users along.&lt;/p&gt;

&lt;p&gt;For example, at the bottom of the dashboard users can set up “triggers”, which are simple conditionals that initiate pre-defined actions based on events in the data stream (“if &lt;em&gt;[this]&lt;/em&gt; happens, then do &lt;em&gt;[that]&lt;/em&gt; …”). When the user activates the “Add trigger” button, a UI change occurs in another part of the DOM — should this be announced to the users somehow?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pxaqaiffr47exscj9jw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pxaqaiffr47exscj9jw.png" alt="Cropped screenshot of the “triggers” area from the dashboard, with one trigger set up" width="800" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As it turns out, screen reader announcements are not necessary in this case because of the abundance of contextual clues in this part of the page. First, the panel on the left with the form has the heading “Create a new trigger”, clearly indicating that the content that follows is used to do something.&lt;/p&gt;

&lt;p&gt;Secondly, the action button itself has a clear label (“Add trigger”) that reaffirms the purpose of the form and sets an expectation that a trigger will be added when it’s activated. A generic label like “Submit” or “Add” would be less helpful for “low confidence” users who may reach the button and wonder, “Is this the right button?”&lt;/p&gt;

&lt;p&gt;When any user activates the “Add trigger” button they have an expectation that one of two things will happen: either a trigger is added successfully, or there is an error. If successful, a trigger is added to the placeholder area, which is the next immediate element in the DOM. For people using screen readers, this means they will encounter it the moment they move past the “Add trigger” button.&lt;/p&gt;

&lt;p&gt;By preselecting radio buttons and defining a default threshold value (displayed as a placeholder), its actually not possible to submit the form with errors. But if it were, we’d want to associate descriptive, visible error messages with each invalid field (using &lt;code&gt;aria-describedy&lt;/code&gt;), then programmatically set focus on the first field with an error that people using screen readers don’t have to “figure out” where the problem is on their own.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;If you’re building an IoT dashboard or some other real-time web interface, I hope this article has given you some practical tips for improving its accessibility. &lt;/p&gt;

&lt;p&gt;To sum it all up, the most important takeaways I’d like to leave you with are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Every interactive element needs a focus indicator, and what is provided by browsers by default it not always the best.&lt;/li&gt;
&lt;li&gt;Make those charts accessible by simplifying interactivity and providing the data through visually-hidden tables.&lt;/li&gt;
&lt;li&gt;Let users slow down the refresh rate for live data so they can take more time to process it.&lt;/li&gt;
&lt;li&gt;Announce major events (like devices going online/offline) using ARIA live regions — but only sparingly!&lt;/li&gt;
&lt;li&gt;Use semantic, valid markup as much as possible — nearly every semantic tag means another bit of “free” functionality for people using screen readers!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And finally, when building out an accessible web project of any kind, nothing beats having it looked at by real, live users! Not only can this sort of feedback provide your team with personalized insights and guidance, but it is also essential in minimizing risk and defending against legal action. Reaching out to an accessibility consulting company like &lt;a href="https://accessible360.com/" rel="noopener noreferrer"&gt;Accessible360&lt;/a&gt; (where I work as a Developer Advocate) is always a great idea!&lt;/p&gt;

</description>
      <category>a11y</category>
      <category>ux</category>
      <category>html</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
