<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>https://web.dev/</id>
  <title>Alice Boxhall on web.dev</title>
  <updated>2026-04-15T23:21:06Z</updated>
  <author>
    <name>Alice Boxhall</name>
  </author>
  <link href="https://web.dev/authors/aliceboxhall/feed.xml" rel="self"/>
  <link href="https://web.dev/"/>
  <icon>https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X7V1IaSbxjs1E7w8BBrH.jpeg?auto=format</icon>
  <logo>https://web.dev/images/shared/rss-banner.png</logo>
  <subtitle>Alice is a contributor to web.dev</subtitle>
  
  
  <entry>
    <title>Introduction to ARIA</title>
    <link href="https://web.dev/semantics-aria/"/>
    <updated>2016-10-04T00:00:00Z</updated>
    <id>https://web.dev/semantics-aria/</id>
    <content type="html" mode="escaped">&lt;p&gt;So far, we&#39;ve encouraged using native HTML elements because they give you focus,
keyboard support, and built-in semantics, but there are times when a simple
layout and native HTML won&#39;t do the job. For example, currently there&#39;s no
standardized HTML element for a very common UI construct, the pop-up menu. Nor
is there an HTML element that provides a semantic characteristic such as &amp;quot;the
user needs to know about this as soon as possible&amp;quot;.&lt;/p&gt;
&lt;p&gt;In this lesson, then, we&#39;ll explore how to express semantics that HTML can&#39;t
express on its own.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://www.w3.org/TR/wai-aria/&quot; class=&quot;external&quot; rel=&quot;noopener&quot;&gt;Web Accessibility Initiative&#39;s Accessible Rich Internet Applications
specification&lt;/a&gt; (WAI-ARIA, or just
ARIA) is good for bridging areas with accessibility issues that can&#39;t be managed
with native HTML. It works by allowing you to specify attributes that modify the
way an element is translated into the accessibility tree. Let&#39;s look at an
example.&lt;/p&gt;
&lt;p&gt;In the following snippet, we use a list item as a kind of custom checkbox. The
CSS &amp;quot;checkbox&amp;quot; class gives the element the required visual characteristics.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;li&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;tabindex&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;checkbox&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;checked&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    Receive promotional offers&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;li&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;While this works fine for sighted users, a screen reader will give no indication
that the element is meant to be a checkbox, so low-vision users may miss the
element entirely.&lt;/p&gt;
&lt;p&gt;Using ARIA attributes, however, we can give the element the missing information
so the screen reader can properly interpret it. Here, we&#39;ve added the &lt;code&gt;role&lt;/code&gt; and
&lt;code&gt;aria-checked&lt;/code&gt; attributes to explicitly identify the element as a checkbox and
to specify that it is checked by default. The list item will now be added to the
accessibility tree and a screen reader will correctly report it as a checkbox.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;li&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;tabindex&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;checkbox&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;role&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;checkbox&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;checked&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;aria-checked&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    Receive promotional offers&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;li&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;aside class=&quot;aside flow bg-state-info-bg color-state-info-text&quot;&gt;&lt;div class=&quot; flow&quot;&gt; We&#39;ll cover the list of ARIA attributes and when to use them &lt;a href=&quot;https://web.dev/semantics-aria/#what-can-aria-do&quot;&gt;later&lt;/a&gt;. &lt;/div&gt;&lt;/aside&gt;
&lt;p&gt;ARIA works by changing and augmenting the standard DOM accessibility tree.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;The standard DOM accessibility tree.&quot; class=&quot;float-right&quot; decoding=&quot;async&quot; height=&quot;383&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 575px) 575px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/fB932LjGfGgJRELivys8.jpg?auto=format&amp;w=1150 1150w&quot; width=&quot;575&quot; /&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;img alt=&quot;The ARIA augmented accessibility tree.&quot; class=&quot;float-right&quot; decoding=&quot;async&quot; height=&quot;383&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 575px) 575px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/G1IWcJBT9tfZq4xCKTqq.jpg?auto=format&amp;w=1150 1150w&quot; width=&quot;575&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;Although ARIA allows us to subtly (or even radically) modify the accessibility
tree for any element on the page, that is the only thing it changes. &lt;strong&gt;ARIA
doesn&#39;t augment any of the element&#39;s inherent behavior&lt;/strong&gt;; it won&#39;t make the
element focusable or give it keyboard event listeners. That is still part of our
development task.&lt;/p&gt;
&lt;p&gt;It&#39;s important to understand that there is no need to redefine default
semantics. Regardless of its use, a standard HTML &lt;code&gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot;&amp;gt;&lt;/code&gt;
element doesn&#39;t need an additional &lt;code&gt;role=&amp;quot;checkbox&amp;quot;&lt;/code&gt; ARIA attribute to be
correctly announced.&lt;/p&gt;
&lt;p&gt;It&#39;s also worth noting that certain HTML elements have restrictions on what ARIA
roles and attributes can be used on them. For example, a standard &lt;code&gt;&amp;lt;input type=&amp;quot;text&amp;quot;&amp;gt;&lt;/code&gt; element may not have any additional role/attribute applied to it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;See the &lt;a href=&quot;https://www.w3.org/TR/html-aria/#sec-strong-native-semantics&quot; rel=&quot;noopener&quot;&gt;ARIA in HTML spec&lt;/a&gt;
for more information.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Let&#39;s see what other capabilities ARIA has to offer.&lt;/p&gt;
&lt;h2 id=&quot;what-can-aria-do&quot;&gt;What can ARIA do? &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/semantics-aria/#what-can-aria-do&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As you saw with the checkbox example, ARIA can modify existing element semantics
or add semantics to elements where no native semantics exist. It can also
express semantic patterns that don&#39;t exist at all in HTML, like a menu or a tab
panel. Often, ARIA lets us create widget-type elements that wouldn&#39;t be possible
with plain HTML.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For example, ARIA can add extra label and description text that is only
exposed to assistive technology APIs.&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;button&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;aria-label&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;screen reader only label&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;button&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;ARIA can express semantic relationships between elements that extend the
standard parent/child connection, such as a custom scrollbar that controls a
specific region.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;role&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;scrollbar&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;aria-controls&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;main&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;main&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    . . .&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;And ARIA can make parts of the page &amp;quot;live,&amp;quot; so they immediately inform
assistive technology when they change.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;aria-live&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;polite&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;span&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;GOOG: $400&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;span&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;One of the core aspects of the ARIA system is its collection of &lt;em&gt;roles&lt;/em&gt;. A role
in accessibility terms amounts to a shorthand indicator for a particular UI
pattern. ARIA provides a vocabulary of patterns we can use via the &lt;code&gt;role&lt;/code&gt;
attribute on any HTML element.&lt;/p&gt;
&lt;p&gt;When we applied &lt;code&gt;role=&amp;quot;checkbox&amp;quot;&lt;/code&gt; in the previous example, we were telling
assistive technology that the element should follow the &amp;quot;checkbox&amp;quot; pattern. That
is, we&#39;re guaranteeing that it will have a checked state (either checked or not
checked), and that the state may be toggled using the mouse or the spacebar,
just like a standard HTML checkbox element.&lt;/p&gt;
&lt;p&gt;In fact, because keyboard interactions feature so prominently in screen reader
usage, it&#39;s very important to make sure that, when creating a custom widget, the
&lt;code&gt;role&lt;/code&gt; attribute is always applied in the same place as the &lt;code&gt;tabindex&lt;/code&gt;
attribute; this ensures that keyboard events go to the right place and that when
focus lands on an element its role is conveyed accurately.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://www.w3.org/TR/wai-aria/&quot; rel=&quot;noopener&quot;&gt;ARIA spec&lt;/a&gt; describes a
taxonomy of possible values for the &lt;code&gt;role&lt;/code&gt; attribute and associated ARIA
attributes that may be used in conjunction with those roles. This is the best
source of definitive information about how the ARIA roles and attributes work
together and how they can be used in a way that is supported by browsers and
assistive technologies.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;A list of all the available ARIA roles.&quot; decoding=&quot;async&quot; height=&quot;361&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HSW9NAR73Hd7gDYiWhQh.jpg?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;However, the spec is very dense; a more approachable place to start is the &lt;a href=&quot;https://www.w3.org/TR/wai-aria-practices-1.1/&quot; rel=&quot;noopener&quot;&gt;ARIA
Authoring Practices document&lt;/a&gt;
, which explores best practices for using the available ARIA roles and
properties.&lt;/p&gt;
&lt;p&gt;ARIA also offers landmark roles that extend the options available in HTML5. See
the &lt;a href=&quot;https://www.w3.org/TR/wai-aria-practices-1.1#kbd_layout_landmark_XHTML&quot; rel=&quot;noopener&quot;&gt;Landmark Roles Design
Patterns&lt;/a&gt;
spec for more information.&lt;/p&gt;
</content>
    <author>
      <name>Meggin Kearney</name>
    </author><author>
      <name>Dave Gash</name>
    </author><author>
      <name>Alice Boxhall</name>
    </author>
  </entry>
  
  <entry>
    <title>Hiding and updating content</title>
    <link href="https://web.dev/hiding-and-updating-content/"/>
    <updated>2016-10-04T00:00:00Z</updated>
    <id>https://web.dev/hiding-and-updating-content/</id>
    <content type="html" mode="escaped">&lt;h2 id=&quot;aria-hidden&quot;&gt;aria-hidden &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/hiding-and-updating-content/#aria-hidden&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Another important technique in fine-tuning the experience for assistive
technology users involves ensuring that only relevant parts of the page are
exposed to assistive technology. There are several ways to ensure that a section
of the DOM does not get exposed to accessibility APIs.&lt;/p&gt;
&lt;p&gt;First, anything that is explicitly hidden from the DOM will also not be included
in the accessibility tree. So anything that has a CSS style of &lt;code&gt;visibility: hidden&lt;/code&gt; or &lt;code&gt;display: none&lt;/code&gt; or uses the HTML5 &lt;code&gt;hidden&lt;/code&gt; attribute will also be
hidden from assistive technology users.&lt;/p&gt;
&lt;p&gt;However, an element that is not visually rendered but not explicitly hidden is
still included in the accessibility tree. One common technique is to include
&amp;quot;screen reader only text&amp;quot; in an element that is absolute positioned offscreen.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.sr-only&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; absolute&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; -10000px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; hidden&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Also, as we have seen, it&#39;s possible to provide screen reader only text via an
&lt;code&gt;aria-label&lt;/code&gt;, &lt;code&gt;aria-labelledby&lt;/code&gt;, or &lt;code&gt;aria-describedby&lt;/code&gt; attribute referencing an
element that is otherwise hidden.&lt;/p&gt;
&lt;p&gt;See this WebAIM article on &lt;a href=&quot;https://webaim.org/techniques/css/invisiblecontent/#techniques&quot; rel=&quot;noopener&quot;&gt;Techniques for hiding
text&lt;/a&gt;
for more information on creating &amp;quot;screen reader only&amp;quot; text.&lt;/p&gt;
&lt;p&gt;Finally, ARIA provides a mechanism for excluding content from assistive
technology that is not visually hidden, using the &lt;code&gt;aria-hidden&lt;/code&gt; attribute.
Applying this attribute to an element effectively removes it &lt;em&gt;and all of its
descendants&lt;/em&gt; from the accessibility tree. The only exceptions are elements
referred to by an &lt;code&gt;aria-labelledby&lt;/code&gt; or &lt;code&gt;aria-describedby&lt;/code&gt; attribute.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;deck&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;slide&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;aria-hidden&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    Sales Targets&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;slide&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    Quarterly Sales&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;slide&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;aria-hidden&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    Action Items&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;For example, you might use &lt;code&gt;aria-hidden&lt;/code&gt; if you&#39;re creating some modal UI that
blocks access to the main page. In this case, a sighted user might see some kind
of semi-transparent overlay indicating that most of the page can&#39;t currently be
used, but a screen reader user may still be able to explore to the other parts
of the page. In this case, as well as creating the keyboard trap &lt;a href=&quot;https://web.dev/using-tabindex/#modals-and-keyboard-traps/&quot;&gt;explained
earlier&lt;/a&gt;,
you need to make sure that the parts of the page that are currently out of scope
are &lt;code&gt;aria-hidden&lt;/code&gt; as well.&lt;/p&gt;
&lt;p&gt;Now that you understand the basics of ARIA, how it plays with native HTML
semantics, and how it can be used to perform fairly major surgery on the
accessibility tree as well as changing the semantics of a single element, let&#39;s
look at how we can use it to convey time-sensitive information.&lt;/p&gt;
&lt;h2 id=&quot;aria-live&quot;&gt;aria-live &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/hiding-and-updating-content/#aria-live&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;aria-live&lt;/code&gt; lets developers mark a part of the page as &amp;quot;live&amp;quot; in the sense that
updates should be communicated to users immediately regardless of the page
position, rather than if they just happen to explore that part of the page. When
an element has an &lt;code&gt;aria-live&lt;/code&gt; attribute, the part of the page containing it and
its descendants is called a &lt;em&gt;live region&lt;/em&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;ARIA live establishes a live region.&quot; decoding=&quot;async&quot; height=&quot;354&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hhZJxeHAdDC9JxNi6wxh.jpg?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;For example, a live region might be a status message that appears as a result of
a user action. If the message is important enough to grab a sighted user&#39;s
attention, it is important enough to direct an assistive technology user&#39;s
attention to it by setting its &lt;code&gt;aria-live&lt;/code&gt; attribute. Compare this plain &lt;code&gt;div&lt;/code&gt;&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;status&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Your message has been sent.&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;with its &amp;quot;live&amp;quot; counterpart.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;status&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;aria-live&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;polite&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Your message has been sent.&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;&lt;code&gt;aria-live&lt;/code&gt; has three allowable values: &lt;code&gt;polite&lt;/code&gt;, &lt;code&gt;assertive&lt;/code&gt;, and &lt;code&gt;off&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;aria-live=&amp;quot;polite&amp;quot;&lt;/code&gt; tells assistive technology to alert the user to this
change when it has finished whatever it is currently doing. It&#39;s great to use
if something is important but not urgent, and accounts for the majority of
&lt;code&gt;aria-live&lt;/code&gt; use.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;aria-live=&amp;quot;assertive&amp;quot;&lt;/code&gt; tells assistive technology to interrupt whatever it&#39;s
doing and alert the user to this change immediately. This is only for
important and urgent updates, such as a status message like &amp;quot;There has been a
server error and your changes are not saved; please refresh the page&amp;quot;, or
updates to an input field as a direct result of a user action, such as
buttons on a stepper widget.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;aria-live=&amp;quot;off&amp;quot;&lt;/code&gt; tells assistive technology to temporarily suspend
&lt;code&gt;aria-live&lt;/code&gt; interruptions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are some tricks to making sure your live regions work correctly.&lt;/p&gt;
&lt;p&gt;First, your &lt;code&gt;aria-live&lt;/code&gt; region should probably be set in the initial page load.
This is not a hard-and-fast rule, but if you&#39;re having difficulty with an
&lt;code&gt;aria-live&lt;/code&gt; region, this might be the issue.&lt;/p&gt;
&lt;p&gt;Second, different screen readers react differently to different types of
changes. For example, it&#39;s possible to trigger an alert on some screen readers
by toggling a descendant element&#39;s &lt;code&gt;hidden&lt;/code&gt; style from true to false.&lt;/p&gt;
&lt;p&gt;Other attributes that work with &lt;code&gt;aria-live&lt;/code&gt; help you fine-tune what is
communicated to the user when the live region changes.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;aria-atomic&lt;/code&gt; indicates whether the entire region should be considered as a
whole when communicating updates. For example, if a date widget consisting of a
day, month, and year has &lt;code&gt;aria-live=true&lt;/code&gt; and &lt;code&gt;aria-atomic=true&lt;/code&gt;, and the user
uses a stepper control to change the value of just the month, the full contents
of the date widget would be read out again. &lt;code&gt;aria-atomic&lt;/code&gt;&#39;s value may be &lt;code&gt;true&lt;/code&gt;
or &lt;code&gt;false&lt;/code&gt; (the default).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;aria-relevant&lt;/code&gt; indicates what types of changes should be presented to the user.
There are some options that may be used separately or as a token list.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;additions&lt;/em&gt;, meaning that any element being added to the live region is
significant. For example, appending a span to an existing log of status
messages would mean that the span would be announced to the user (assuming
that &lt;code&gt;aria-atomic&lt;/code&gt; was &lt;code&gt;false&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;em&gt;text&lt;/em&gt;, meaning that text content being added to any descendant node is
relevant. For example, modifying a custom text field&#39;s &lt;code&gt;textContent&lt;/code&gt; property
would read the modified text to the user.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;removals&lt;/em&gt;, meaning that the removal of any text or descendant nodes should
be conveyed to the user.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;all&lt;/em&gt;, meaning that all changes are relevant. However, the default value for
&lt;code&gt;aria-relevant&lt;/code&gt; is &lt;code&gt;additions text&lt;/code&gt;, meaning that if you don&#39;t specify
&lt;code&gt;aria-relevant&lt;/code&gt; it will update the user for any addition to the element,
which is what you are most likely to want.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, &lt;code&gt;aria-busy&lt;/code&gt; lets you notify assistive technology that it should
temporarily ignore changes to an element, such as when things are loading. Once
everything is in place, &lt;code&gt;aria-busy&lt;/code&gt; should be set to false to normalize the
reader&#39;s operation.&lt;/p&gt;
</content>
    <author>
      <name>Meggin Kearney</name>
    </author><author>
      <name>Dave Gash</name>
    </author><author>
      <name>Alice Boxhall</name>
    </author>
  </entry>
  
  <entry>
    <title>Semantics and navigating content</title>
    <link href="https://web.dev/navigating-content/"/>
    <updated>2016-10-04T00:00:00Z</updated>
    <id>https://web.dev/navigating-content/</id>
    <content type="html" mode="escaped">&lt;p&gt;You&#39;ve learned about affordances, semantics, and how assistive technologies use
the accessibility tree to create an alternative user experience for their users.
You can see that writing expressive, semantic HTML gives you a lot of
accessibility with very little effort, as many standard elements have both the
semantics and supporting behavior built in.&lt;/p&gt;
&lt;p&gt;In this lesson we&#39;ll cover some less obvious semantics that are very important
to screen reader users, especially as regards navigation. In a simple page with
lots of controls but not much content, it&#39;s easy to scan the page to find what
you need. But on a content-heavy page, such as a Wikipedia entry or a news
aggregator, it&#39;s not practical to read through everything from the top down; you
need a way to efficiently navigate through the content.&lt;/p&gt;
&lt;p&gt;Developers often have the misconception that screen readers are tedious and slow
to use, or that everything on the screen has to be focusable for the screen
reader to find it. That&#39;s often not the case.&lt;/p&gt;
&lt;p&gt;Screen reader users often rely on a list of headings to locate information. Most
screen readers have easy ways to isolate and scan a list of page headings, an
important feature called the &lt;em&gt;rotor&lt;/em&gt;. Let&#39;s see how we can use HTML headings
effectively to support this feature.&lt;/p&gt;
&lt;h2 id=&quot;using-headings-effectively&quot;&gt;Using headings effectively &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/navigating-content/#using-headings-effectively&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;First, let&#39;s reiterate an earlier point: &lt;a href=&quot;https://web.dev/dom-order-matters/&quot;&gt;&lt;em&gt;DOM order
matters&lt;/em&gt;&lt;/a&gt;, not only for
focus order but for screen reader order. As you experiment with screen readers
like VoiceOver, NVDA, JAWS, and ChromeVox, you&#39;ll find the heading list follows
the DOM order rather than the visual order.&lt;/p&gt;
&lt;p&gt;This is true for screen readers in general. Because screen readers interact with
the accessibility tree, and the accessibility tree is based on the DOM tree, the
order a screen reader perceives is thus directly based on the DOM order. This
means that an appropriate heading structure is more important than ever.&lt;/p&gt;
&lt;p&gt;In most well-structured pages, the heading levels are nested to indicate
parent-child relationships among content blocks. The &lt;a href=&quot;https://webaim.org/standards/wcag/checklist&quot; rel=&quot;noopener&quot;&gt;WebAIM
checklist&lt;/a&gt; repeatedly refers to this
technique.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://webaim.org/standards/wcag/checklist#sc1.3.1&quot; class=&quot;external&quot; rel=&quot;noopener&quot;&gt;1.3.1&lt;/a&gt;
mentions &amp;quot;Semantic markup is used to designate headings&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://webaim.org/standards/wcag/checklist#sc2.4.1&quot; class=&quot;external&quot; rel=&quot;noopener&quot;&gt;2.4.1&lt;/a&gt;
mentions heading structure as a technique for bypassing blocks of
content&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://webaim.org/standards/wcag/checklist#sc2.4.6&quot; class=&quot;external&quot; rel=&quot;noopener&quot;&gt;2.4.6&lt;/a&gt;
discusses some details for writing useful headings&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://webaim.org/standards/wcag/checklist#sc2.4.10&quot; class=&quot;external&quot; rel=&quot;noopener&quot;&gt;2.4.10&lt;/a&gt;
states &amp;quot;individual sections of content are designated using headings,
where appropriate&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Not all headings have to be visible on-screen.
&lt;a href=&quot;https://www.wikipedia.org/&quot; rel=&quot;noopener&quot;&gt;Wikipedia&lt;/a&gt;, for instance, uses a technique that
deliberately places some headings off-screen to specifically make them
accessible &lt;em&gt;only&lt;/em&gt; to screen readers and other assistive technology.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;style&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token style&quot;&gt;&lt;span class=&quot;token language-css&quot;&gt;&lt;br /&gt;    &lt;span class=&quot;token selector&quot;&gt;.sr-only&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;absolute&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;-10000px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;auto&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;1px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;1px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;hidden&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;style&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;h2&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;sr-only&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;This heading is offscreen.&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;h2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;aside class=&quot;aside flow bg-state-info-bg color-state-info-text&quot;&gt;&lt;div class=&quot; flow&quot;&gt; The WebAIM site discusses this technique at length in &lt;a href=&quot;https://webaim.org/techniques/css/invisiblecontent/&quot;&gt;this article on offscreen content&lt;/a&gt;. &lt;/div&gt;&lt;/aside&gt;
&lt;p&gt;For complex applications, this can be a good way to accommodate headings when
the visual design doesn&#39;t require or have room for a visible heading.&lt;/p&gt;
&lt;p&gt;Caution: It&#39;s important not to go overboard with this technique. Remember that
assistive technology users may also be able to see the screen for themselves, so
going too far down the path of creating &amp;quot;screen reader only&amp;quot; content may
actually degrade the user experience for some users. It can also create a
maintenance headache for you later.&lt;/p&gt;
&lt;h2 id=&quot;other-navigation-options&quot;&gt;Other navigation options &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/navigating-content/#other-navigation-options&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Although pages with good headings help screen reader users navigate, there are
other elements they can use to move around a page, including &lt;em&gt;links&lt;/em&gt;, &lt;em&gt;form
controls&lt;/em&gt;, and &lt;em&gt;landmarks&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Readers can use the screen reader&#39;s rotor feature (an easy way to isolate and
scan a list of page headings) to access a &lt;em&gt;list of links&lt;/em&gt; on the page.
Sometimes, as on a wiki, there are many links, so the reader might search for a
term within the links. This limits the hits to links that actually contain the
term, rather than every occurrence of the term on the page.&lt;/p&gt;
&lt;p&gt;This feature is useful only if the screen reader can find the links and the link
text is meaningful. For example, here are some common patterns that make links
hard to find.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Anchor tags without &lt;code&gt;href&lt;/code&gt; attributes. Often used in single-page
applications, these link targets cause problems for screen readers. You can
read more in &lt;a href=&quot;http://neugierig.org/software/blog/2014/02/single-page-app-links.html&quot; rel=&quot;noopener&quot;&gt;this article on single-page apps&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Buttons that are implemented with links. These cause the screen reader to
interpret the content as a link, and the button functionality is lost. For
these cases, replace the anchor tag with a real button and style it
appropriately.&lt;/li&gt;
&lt;li&gt;Images used as link content. Sometimes necessary, linked images can be
unusable to screen readers. To guarantee that the link is properly exposed to
assistive technology, make sure the image has &lt;code&gt;alt&lt;/code&gt; attribute text.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Poor link text is another problem. Clickable text such as &amp;quot;learn more&amp;quot; or &amp;quot;click
here&amp;quot; provides no semantic information about where the link goes. Instead, use
descriptive text like &amp;quot;learn more about responsive design&amp;quot; or &amp;quot;see this canvas
tutorial&amp;quot; to help screen readers provide meaningful context about links.&lt;/p&gt;
&lt;p&gt;The rotor can also retrieve a &lt;em&gt;form control list&lt;/em&gt;. Using this list, readers can
search for specific items and go directly to them.&lt;/p&gt;
&lt;p&gt;A common error that screen readers make is pronunciation. For example, a screen
reader might pronounce &amp;quot;Udacity&amp;quot; as &amp;quot;oo-dacity&amp;quot;, or read a phone number as a
large integer, or read capitalized text as though it were an acronym.
Interestingly, screen reader users are quite used to this quirk and take it into
consideration.&lt;/p&gt;
&lt;p&gt;Some developers try to ameliorate this situation by providing screen-reader-only
text that is spelled phonetically. Here&#39;s a simple rule for phonetic spelling:
&lt;strong&gt;don&#39;t do it&lt;/strong&gt;; it only makes the problem worse! If, for example, a user is using
a braille display, the word will be spelled incorrectly, leading to more
confusion. Screen readers allow words to be spelled aloud, so leave it to the
reader to control their experience and decide when this is necessary.&lt;/p&gt;
&lt;p&gt;Readers can use the rotor to see a &lt;em&gt;landmarks list&lt;/em&gt;. This list helps readers
find the main content and a set of navigational landmarks provided by HTML
landmark elements.&lt;/p&gt;
&lt;p&gt;HTML5 introduced some new elements that help define the semantic structure of
the page, including &lt;code&gt;header&lt;/code&gt;, &lt;code&gt;footer&lt;/code&gt;, &lt;code&gt;nav&lt;/code&gt;, &lt;code&gt;article&lt;/code&gt;, &lt;code&gt;section&lt;/code&gt;, &lt;code&gt;main&lt;/code&gt;, and
&lt;code&gt;aside&lt;/code&gt;. These elements specifically provide structural clues in the page
without forcing any built-in styling (which you should do with CSS anyway).&lt;/p&gt;
&lt;p&gt;Semantic structural elements replace multiple, repetitive &lt;code&gt;div&lt;/code&gt; blocks, and
provide a clearer, more descriptive way to intuitively express page structure
for both authors and readers.&lt;/p&gt;
</content>
    <author>
      <name>Meggin Kearney</name>
    </author><author>
      <name>Dave Gash</name>
    </author><author>
      <name>Alice Boxhall</name>
    </author>
  </entry>
  
  <entry>
    <title>The Accessibility Tree</title>
    <link href="https://web.dev/the-accessibility-tree/"/>
    <updated>2016-10-04T00:00:00Z</updated>
    <id>https://web.dev/the-accessibility-tree/</id>
    <content type="html" mode="escaped">&lt;p&gt;Imagine that you&#39;re building a user interface &lt;em&gt;for screen reader users only&lt;/em&gt;.
Here, you don&#39;t need to create any visual UI at all, but just provide enough
information for the screen reader to use.&lt;/p&gt;
&lt;p&gt;What you&#39;d be creating is a kind of API describing the page structure, similar
to the DOM API, but you can get away with less information and fewer nodes,
because a lot of that information is only useful for visual presentation. It
might look something like this.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;screen reader DOM API mockup&quot; decoding=&quot;async&quot; height=&quot;387&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/oVhpmyLS5pMVZOrtd6j9.jpg?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;This is basically what the browser actually presents to the screen reader. The
browser takes the DOM tree and modifies it into a form that is useful to
assistive technology. We refer to this modified tree as the &lt;em&gt;Accessibility
Tree&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;You might visualize the accessibility tree as looking a bit like an old web page
from the &#39;90s: a few images, lots of links, perhaps a field and a button.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;a 1990s style web page&quot; decoding=&quot;async&quot; height=&quot;304&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 640px) 640px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/7vls7AdHtbkVikDgHFIw.png?auto=format&amp;w=1280 1280w&quot; width=&quot;640&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;Visually scanning down a page like this case gives you an experience similar to
what a screen reader user would get. The interface is there, but it is simple
and direct, much like an accessibility tree interface.&lt;/p&gt;
&lt;p&gt;The accessibility tree is what most assistive technologies interact with. The
flow goes something like this.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;An application (the browser or other app) exposes a semantic version of its
UI to assistive technology via an API.&lt;/li&gt;
&lt;li&gt;The assistive technology may use the information it reads via the API to
create an alternative user interface presentation for the user. For example,
a screen reader creates an interface in which the user hears a spoken
representation of the app.&lt;/li&gt;
&lt;li&gt;The assistive technology may also allow the user to interact with the app in
a different way. For example, most screen readers provide hooks to allow a
user to easily simulate a mouse click or finger tap.&lt;/li&gt;
&lt;li&gt;The assistive technology relays the user intent (such as &amp;quot;click&amp;quot;) back to
the app via the accessibility API. The app then has the responsibility to
interpret the action appropriately in the context of the original UI.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For web browsers, there&#39;s an extra step in each direction, because the browser
is in fact a platform for web apps that run inside it. So the browser needs to
translate the web app into an accessibility tree, and must make sure that the
appropriate events get fired in JavaScript based on the user actions that come
in from the assistive technology.&lt;/p&gt;
&lt;p&gt;But that is all the browser&#39;s responsibility. Our job as web developers is just
to be aware that this is going on, and to develop web pages that take advantage
of this process to create an accessible experience for our users.&lt;/p&gt;
&lt;p&gt;We do this by ensuring that we express the semantics of our pages correctly:
making sure that the important elements in the page have the correct accessible
roles, states, and properties, and that we specify accessible names and
descriptions. The browser can then let the assistive technology access that
information to create a customized experience.&lt;/p&gt;
&lt;h2 id=&quot;semantics-in-native-html&quot;&gt;Semantics in native HTML &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/the-accessibility-tree/#semantics-in-native-html&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A browser can transform the DOM tree into an accessibility tree because much of
the DOM has &lt;em&gt;implicit&lt;/em&gt; semantic meaning. That is, the DOM uses native HTML
elements that are recognized by browsers and work predictably on a variety of
platforms. Accessibility for native HTML elements such as links or buttons is
thus handled automatically. We can take advantage of that built-in accessibility
by writing HTML that expresses the semantics of our page elements.&lt;/p&gt;
&lt;p&gt;However, sometimes we use elements that look like native elements but aren&#39;t.
For example, this &amp;quot;button&amp;quot; isn&#39;t a button at all.&lt;/p&gt;
&lt;style&gt;
    .fancy-btn {
        display: inline-block;
        background: #BEF400;
        border-radius: 8px;
        padding: 10px;
        font-weight: bold;
        user-select: none;
        cursor: pointer;
    }
&lt;/style&gt;
&lt;div class=&quot;fancy-btn&quot;&gt;Give me tacos&lt;/div&gt;
&lt;p&gt;It might be constructed in HTML in any number of ways; one way is shown below.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;button-ish&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Give me tacos&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;When we don&#39;t use an actual button element, the screen reader has no way to know
what it has landed on. Also, we would have to do the extra work &lt;a href=&quot;https://web.dev/using-tabindex/&quot;&gt;of adding
tabindex&lt;/a&gt; to make it
usable to keyboard-only users because, as it is coded now, it can only be used
with a mouse.&lt;/p&gt;
&lt;p&gt;We can easily fix this by using a regular &lt;code&gt;button&lt;/code&gt; element instead of a &lt;code&gt;div&lt;/code&gt;.
Using a native element also has the benefit of taking care of keyboard
interactions for us. And remember that you don&#39;t have to lose your spiffy visual
effects just because you use a native element; you can style native elements to
make them look the way you want and still retain the implicit semantics and
behavior.&lt;/p&gt;
&lt;p&gt;Earlier we noted that screen readers will announce an element&#39;s role, name,
state, and value. By using the right semantic element, role, state, and value
are covered, but we must also ensure that we make an element&#39;s name
discoverable.&lt;/p&gt;
&lt;p&gt;Broadly, there are two types of names:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Visible labels&lt;/em&gt;, which are used by all users to associate meaning with an
element, and&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Text alternatives&lt;/em&gt;, which are only used when there is no need for a visual
label.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For text-level elements, we don&#39;t need to do anything, because by definition it
will have some text content. However, for input or control elements, and visual
content like images, we need to make sure that we specify a name. In fact,
providing text alternatives for any non-text content is &lt;a href=&quot;https://webaim.org/standards/wcag/checklist#g1.1&quot; rel=&quot;noopener&quot;&gt;the very
first item on the WebAIM checklist&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One way to do that is to follow their recommendation that &amp;quot;Form inputs have
associated text labels.&amp;quot; There are two ways to associate a label with a form
element, such as a checkbox. Either of the methods causes the label text to also
become a click target for the checkbox, which is also helpful for mouse or
touchscreen users. To associate a label with an element, either&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Place the input element inside a label element&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;checkbox&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Receive promotional offers?&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 10px;&quot;&gt;
    &lt;label style=&quot;font-size: 16px; color: #212121;&quot;&gt;
        &lt;input type=&quot;checkbox&quot; /&gt;Receive promotional offers?
    &lt;/label&gt;
&lt;/div&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use the label&#39;s &lt;code&gt;for&lt;/code&gt; attribute and refer to the element&#39;s &lt;code&gt;id&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;promo&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;checkbox&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;label&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;promo&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Receive promotional offers?&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div style=&quot;margin: 10px;&quot;&gt;
    &lt;input id=&quot;promo&quot; type=&quot;checkbox&quot; /&gt;
    &lt;label for=&quot;promo&quot;&gt;Receive promotional offers?&lt;/label&gt;
&lt;/div&gt;
&lt;p&gt;When the checkbox has been labeled correctly, the screen reader can report that
the element has a role of checkbox, is in a checked state, and is named &amp;quot;Receive
promotional offers?&amp;quot;.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;on-screen text output from VoiceOver showing the spoken label for a checkbox&quot; decoding=&quot;async&quot; height=&quot;174&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 640px) 640px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/16hxTfkqd3OTHoB8joMo.png?auto=format&amp;w=1280 1280w&quot; width=&quot;640&quot; /&gt;
&lt;/figure&gt;
&lt;aside class=&quot;aside flow bg-state-good-bg color-state-good-text&quot;&gt;&lt;p class=&quot;cluster &quot;&gt;&lt;span class=&quot;aside__icon box-block &quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; height=&quot;24&quot; width=&quot;24&quot; fill=&quot;currentColor&quot; role=&quot;img&quot; aria-label=&quot;Check&quot;&gt;   &lt;path d=&quot;M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z&quot;&gt;&lt;/path&gt; &lt;/svg&gt;&lt;/span&gt;&lt;strong&gt;Success&lt;/strong&gt;&lt;/p&gt;&lt;div class=&quot; flow&quot;&gt; You can actually use the screen reader to find improperly-associated labels by tabbing through the page and verifying the spoken roles, states, and names. &lt;/div&gt;&lt;/aside&gt;
</content>
    <author>
      <name>Meggin Kearney</name>
    </author><author>
      <name>Dave Gash</name>
    </author><author>
      <name>Alice Boxhall</name>
    </author>
  </entry>
  
  <entry>
    <title>ARIA labels and relationships</title>
    <link href="https://web.dev/aria-labels-and-relationships/"/>
    <updated>2016-10-04T00:00:00Z</updated>
    <id>https://web.dev/aria-labels-and-relationships/</id>
    <content type="html" mode="escaped">&lt;h2 id=&quot;labels&quot;&gt;Labels &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/aria-labels-and-relationships/#labels&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;ARIA provides several mechanisms for adding labels and descriptions to elements.
In fact, ARIA is the only way to add accessible help or description text. Let&#39;s
look at the properties ARIA uses to create accessible labels.&lt;/p&gt;
&lt;h3 id=&quot;aria-label&quot;&gt;aria-label &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/aria-labels-and-relationships/#aria-label&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;aria-label&lt;/code&gt; allows us to specify a string to be used as the accessible label.
This overrides any other native labeling mechanism, such as a &lt;code&gt;label&lt;/code&gt; element
— for example, if a &lt;code&gt;button&lt;/code&gt; has both text content and an &lt;code&gt;aria-label&lt;/code&gt;,
only the &lt;code&gt;aria-label&lt;/code&gt; value will be used.&lt;/p&gt;
&lt;p&gt;You might use an &lt;code&gt;aria-label&lt;/code&gt; attribute when you have some kind of visual
indication of an element&#39;s purpose, such as a button that uses a graphic instead
of text, but still need to clarify that purpose for anyone who cannot access the
visual indication, such as a button that uses only an image to indicate its
purpose.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;Using aria-label to identify an image only button.&quot; decoding=&quot;async&quot; height=&quot;268&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 575px) 575px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/ztuCT2fpHvBsKxSBJaXn.jpg?auto=format&amp;w=1150 1150w&quot; width=&quot;575&quot; /&gt;
&lt;/figure&gt;
&lt;h3 id=&quot;aria-labelledby&quot;&gt;aria-labelledby &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/aria-labels-and-relationships/#aria-labelledby&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;aria-labelledby&lt;/code&gt; allows us to specify the ID of another element in the DOM as
an element&#39;s label.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;Using aria-labelledby to identify a radio group.&quot; decoding=&quot;async&quot; height=&quot;307&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 575px) 575px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/YQfKTKuskbWwUg1tLlos.jpg?auto=format&amp;w=1150 1150w&quot; width=&quot;575&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;This is much like using a &lt;code&gt;label&lt;/code&gt; element, with some key differences.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;aria-labelledby&lt;/code&gt; may be used on any element, not just labelable elements.&lt;/li&gt;
&lt;li&gt;While a &lt;code&gt;label&lt;/code&gt; element refers to the thing it labels, the relationship is
reversed in the case of &lt;code&gt;aria-labelledby&lt;/code&gt; — the thing being
labeled refers to the thing that labels it.&lt;/li&gt;
&lt;li&gt;Only one label element may be associated with a labelable element, but
&lt;code&gt;aria-labelledby&lt;/code&gt; can take a list of IDREFs to compose a label from multiple
elements. The label will be concatenated in the order that the IDREFs are
given.&lt;/li&gt;
&lt;li&gt;You can use &lt;code&gt;aria-labelledby&lt;/code&gt; to refer to elements that are hidden and would
otherwise not be in the accessibility tree. For example, you could add a
hidden &lt;code&gt;span&lt;/code&gt; next to an element you want to label, and refer to that with
&lt;code&gt;aria-labelledby&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;However, since ARIA only affects the accessibility tree, &lt;code&gt;aria-labelledby&lt;/code&gt;
does not give you the familiar label-clicking behavior you get from using a
&lt;code&gt;label&lt;/code&gt; element.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Importantly, &lt;code&gt;aria-labelledby&lt;/code&gt; overrides &lt;strong&gt;all&lt;/strong&gt; other name sources for an
element. So, for example, if an element has both an &lt;code&gt;aria-labelledby&lt;/code&gt; and an
&lt;code&gt;aria-label&lt;/code&gt;, or an &lt;code&gt;aria-labelledby&lt;/code&gt; and a native HTML &lt;code&gt;label&lt;/code&gt;, the
&lt;code&gt;aria-labelledby&lt;/code&gt; label always takes precedence.&lt;/p&gt;
&lt;h2 id=&quot;relationships&quot;&gt;Relationships &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/aria-labels-and-relationships/#relationships&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;aria-labelledby&lt;/code&gt; is an example of a &lt;em&gt;relationship attribute&lt;/em&gt;. A relationship
attribute creates a semantic relationship between elements on the page
regardless of their DOM relationship. In the case of &lt;code&gt;aria-labelledby&lt;/code&gt;, that
relationship is &amp;quot;this element is labelled by that element&amp;quot;.&lt;/p&gt;
&lt;p&gt;The ARIA specification lists &lt;a href=&quot;https://www.w3.org/TR/wai-aria/states_and_properties#attrs_relationships&quot; rel=&quot;noopener&quot;&gt;eight relationship
attributes&lt;/a&gt;.
Six of these, &lt;code&gt;aria-activedescendant&lt;/code&gt;, &lt;code&gt;aria-controls&lt;/code&gt;, &lt;code&gt;aria-describedby&lt;/code&gt;,
&lt;code&gt;aria-labelledby&lt;/code&gt;, and &lt;code&gt;aria-owns&lt;/code&gt;, take a reference to one or more elements to
create a new link between elements on the page. The difference in each case is
what that link means and how it is presented to users.&lt;/p&gt;
&lt;h3 id=&quot;aria-owns&quot;&gt;aria-owns &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/aria-labels-and-relationships/#aria-owns&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;aria-owns&lt;/code&gt; is one of the most widely used ARIA relationships. This attribute
allows us to tell assistive technology that an element that is separate in the
DOM should be treated as a child of the current element, or to rearrange
existing child elements into a different order. For example, if a pop-up
sub-menu is visually positioned near its parent menu, but cannot be a DOM child
of its parent because it would affect the visual presentation, you can use
&lt;code&gt;aria-owns&lt;/code&gt; to present the sub-menu as a child of the parent menu to a screen
reader.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;Using aria-owns to establish a relationship between a menu and a submenu.&quot; decoding=&quot;async&quot; height=&quot;377&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/K5dAbga6rD8APoZi3IUS.jpg?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;/figure&gt;
&lt;h3 id=&quot;aria-activedescendant&quot;&gt;aria-activedescendant &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/aria-labels-and-relationships/#aria-activedescendant&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;aria-activedescendant&lt;/code&gt; plays a related role. Just as the active element of a
page is the one that has focus, setting the active descendant of an element
allows us to tell assistive technology that an element should be presented to
the user as the focused element when its parent actually has the focus. For
example, in a listbox, you might want to leave page focus on the listbox
container, but keep its &lt;code&gt;aria-activedescendant&lt;/code&gt; attribute updated to the
currently selected list item. This makes the currently selected item appear to
assistive technology as if it is the focused item.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;Using aria-activedescendant to establish a relationship in a listbox.&quot; decoding=&quot;async&quot; height=&quot;370&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/v1Ov4bak7cBYT9T6rIGT.jpg?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;/figure&gt;
&lt;h3 id=&quot;aria-describedby&quot;&gt;aria-describedby &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/aria-labels-and-relationships/#aria-describedby&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;aria-describedby&lt;/code&gt; provides an accessible description in the same way that
&lt;code&gt;aria-labelledby&lt;/code&gt; provides a label. Like &lt;code&gt;aria-labelledby&lt;/code&gt;, &lt;code&gt;aria-describedby&lt;/code&gt;
may reference elements that are otherwise not visible, whether hidden from the
DOM, or hidden from assistive technology users. This is a useful technique when
there is some extra explanatory text that a user might need, whether it applies
only to users of assistive technology or all users.&lt;/p&gt;
&lt;p&gt;A common example is a password input field that is accompanied by some
descriptive text explaining the minimum password requirements. Unlike a label,
this description may or may not ever be presented to the user; they may have a
choice of whether to access it, or it may come after all the other information,
or it may be pre-empted by something else. For example, if the user is entering
information, their input will be echoed back and may interrupt the element&#39;s
description. Thus, a description is a great way to communicate supplementary,
but not essential, information; it won&#39;t get in the way of more critical
information such as the element&#39;s role.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;Using aria-describedby to establish a relationship with a password field.&quot; decoding=&quot;async&quot; height=&quot;353&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/gs2BVykPBYV1Ac2tNr8K.jpg?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;/figure&gt;
&lt;h3 id=&quot;aria-posinset-and-aria-setsize&quot;&gt;aria-posinset &amp;amp; aria-setsize &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/aria-labels-and-relationships/#aria-posinset-and-aria-setsize&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The remaining relationship attributes are a little different, and work together.
&lt;code&gt;aria-posinset&lt;/code&gt; (&amp;quot;position in set&amp;quot;) and &lt;code&gt;aria-setsize&lt;/code&gt; (&amp;quot;size of set&amp;quot;) are about
defining a relationship between sibling elements in a set, such as a list.&lt;/p&gt;
&lt;p&gt;When the size of a set cannot be determined by the elements present in the DOM
— such as when lazy rendering is used to avoid having all of a large list
in the DOM at once — &lt;code&gt;aria-setsize&lt;/code&gt; can specify the actual set size, and
&lt;code&gt;aria-posinset&lt;/code&gt; can specify the element&#39;s position in the set. For example, in a
set that might contain 1000 elements, you could say that a particular element
has an &lt;code&gt;aria-posinset&lt;/code&gt; of 857 even though it appears first in the DOM, and then
use dynamic HTML techniques to ensure that the user can explore the full list on
demand.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;Using aria-posinset and aria-setsize to establish a relationship in a list.&quot; decoding=&quot;async&quot; height=&quot;382&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/HL5MFhh74egrOD2537WO.jpg?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;/figure&gt;
</content>
    <author>
      <name>Meggin Kearney</name>
    </author><author>
      <name>Dave Gash</name>
    </author><author>
      <name>Alice Boxhall</name>
    </author>
  </entry>
  
  <entry>
    <title>Introduction to semantics</title>
    <link href="https://web.dev/semantics-builtin/"/>
    <updated>2016-10-04T00:00:00Z</updated>
    <id>https://web.dev/semantics-builtin/</id>
    <content type="html" mode="escaped">&lt;p&gt;You&#39;ve seen how to make a site accessible to users who can&#39;t use a mouse or
pointing device — whether due to physical impairment, a technology issue,
or personal preference — by addressing keyboard-only use. While it
requires some care and thought, it&#39;s not a huge amount of work if you plan it
from the beginning. Once that basic work is done, you&#39;re a long way down the
path to a fully accessible and more polished site.&lt;/p&gt;
&lt;p&gt;In this lesson, we&#39;ll build on that work and get you thinking about other
accessibility factors, such as how to build websites to support &lt;a href=&quot;https://web.dev/accessibility/#understanding-users-diversity&quot;&gt;users like
Victor Tsaran&lt;/a&gt;,
who can&#39;t see the screen.&lt;/p&gt;
&lt;p&gt;First, we&#39;ll get some background on &lt;em&gt;assistive technology&lt;/em&gt;, the general term for
tools like screen readers that help  users with impairments that can keep them
from accessing information.&lt;/p&gt;
&lt;p&gt;Next, we&#39;ll look at some general user experience concepts, and build on those to
take a deeper dive into the experience of users of assistive technology.&lt;/p&gt;
&lt;p&gt;Finally, we&#39;ll see how to use HTML effectively to create a good experience for
these users, and how it overlaps quite a bit with the way we addressed focus
earlier.&lt;/p&gt;
&lt;h2 id=&quot;assistive-technology&quot;&gt;Assistive technology &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/semantics-builtin/#assistive-technology&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Assistive technology&lt;/em&gt; is an umbrella term for devices, software, and tools that
help any person with a disability complete a task. In the broadest sense this
could be something low-tech like a crutch for walking or a magnifying glass for
reading, or something high-tech like a robotic arm or image recognition software
on a smartphone.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;Assistive technology examples including crutch magnifying glass and robotic prosthesis.&quot; decoding=&quot;async&quot; height=&quot;328&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 425px) 425px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/8H2hJ9uJOP9bmlJozkIw.png?auto=format&amp;w=850 850w&quot; width=&quot;425&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;Assistive technology can include something as general as browser zoom, or as
specific as a custom-designed game controller. It can be a separate physical
device like a braille display, or be implemented completely in software like
voice control. It can be built-in to the operating system like some screen
readers, or it can be an add-on like a Chrome extension.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;More assistive technology examples including browser zoom braille display and voice control.&quot; decoding=&quot;async&quot; height=&quot;340&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 373px) 373px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/QACHirntVoVRCP5PbF24.png?auto=format&amp;w=746 746w&quot; width=&quot;373&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;The line between assistive technology and technology in general is blurry; after
all, all technology is meant to assist people with some task or another. And
technologies can often move into and out of the &amp;quot;assistive&amp;quot; category.&lt;/p&gt;
&lt;p&gt;For example, one of the earliest commercial speech synthesis products was a
talking calculator for the blind. Now speech synthesis is all over the place,
from driving directions to virtual assistants. Conversely, technology that was
originally general-purpose often finds an assistive use. For example, people
with low vision may use their smartphone&#39;s camera zoom to get a better look at
something small in the real world.&lt;/p&gt;
&lt;p&gt;In the context of web development, we must consider a diverse range of
technologies. People may interact with your website using a screen reader or
braille display, with a screen magnifier, via voice control, using a switch
device, or with some other form of assistive technology that adapts the page&#39;s
default interface to create a more specific interface that they can use.&lt;/p&gt;
&lt;p&gt;Many of these assistive technologies rely on &lt;em&gt;programmatically expressed
semantics&lt;/em&gt; to create an accessible user experience, and that&#39;s what most of this
lesson is about. But before we can explain programmatically expressed semantics,
we need to talk a bit about &lt;em&gt;affordances&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id=&quot;affordances&quot;&gt;Affordances &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/semantics-builtin/#affordances&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When we use a man-made tool or device, we typically look to its form and design
to give us an idea of what it does and how it works. An &lt;em&gt;affordance&lt;/em&gt; is any
object that offers, or affords, its user the opportunity to perform an action.
The better the affordance is designed, the more obvious or intuitive its use.&lt;/p&gt;
&lt;p&gt;A classic example is a kettle or teapot. You can easily recognize that you
should pick it up by the handle, not the spout, even if you&#39;ve never seen a
teapot before.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;A teapot with handle and spout.&quot; decoding=&quot;async&quot; height=&quot;446&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 640px) 640px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/X62dJMHmLHJQd6qZWWCr.png?auto=format&amp;w=1280 1280w&quot; width=&quot;640&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;That&#39;s because the affordance is similar to those you have seen on many other
objects -- watering pots, beverage pitchers, coffee mugs, and so on. You
probably &lt;em&gt;could&lt;/em&gt; pick up the pot by the spout, but your experience with similar
affordances tells you the handle is the better option.&lt;/p&gt;
&lt;p&gt;In graphical user interfaces, affordances represent actions we can take, but
they can be ambiguous because there is no physical object to interact with. GUI
affordances are thus specifically designed to be unambiguous: buttons, check
boxes, and scroll bars are meant to convey their usage with as little training
as possible.&lt;/p&gt;
&lt;p&gt;For example, you might paraphrase the use of some common form elements
(affordances) like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Radio buttons — &amp;quot;I can choose one of these options.&amp;quot;&lt;/li&gt;
&lt;li&gt;Check box — &amp;quot;I can choose &#39;yes&#39; or &#39;no&#39; to this option.&amp;quot;&lt;/li&gt;
&lt;li&gt;Text field — &amp;quot;I can type something into this area.&amp;quot;&lt;/li&gt;
&lt;li&gt;Dropdown — &amp;quot;I can open this element to display my options.&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You are able to draw conclusions about these elements &lt;em&gt;only because you can see
them&lt;/em&gt;. Naturally, someone who can&#39;t see the visual clues provided by an element
can&#39;t comprehend its meaning or intuitively grasp the value of the affordance.
So we must make sure that the information is expressed flexibly enough to be
accessed by assistive technology that can construct an alternative interface to
suit its user&#39;s needs.&lt;/p&gt;
&lt;p&gt;This non-visual exposure of an affordance&#39;s use is called its &lt;em&gt;semantics&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id=&quot;screen-readers&quot;&gt;Screen readers &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/semantics-builtin/#screen-readers&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One popular type of assistive technology is the &lt;em&gt;screen reader&lt;/em&gt;, a program that
enables visually impaired people to use computers by reading screen text aloud
in a generated voice. The user can control what is read by moving the cursor to
a relevant area with the keyboard.&lt;/p&gt;
&lt;p&gt;We asked &lt;a href=&quot;https://web.dev/accessibility/#understanding-users-diversity&quot;&gt;Victor
Tsaran&lt;/a&gt;
to explain how, as a blind person, he accesses the web using a the built-in
screen reader on OS X, called VoiceOver. See &lt;a href=&quot;https://www.youtube.com/watch?v=QW_dUs9D1oQ&quot; rel=&quot;noopener&quot;&gt;this
video&lt;/a&gt; of Victor using VoiceOver.&lt;/p&gt;
&lt;p&gt;Now, it&#39;s your turn to try using a screen reader. Here is a page with &lt;em&gt;ChromeVox
Lite&lt;/em&gt;, a minimal but functioning screen reader written in JavaScript. The screen
is purposefully blurred to simulate a low-vision experience and force the user
to complete the task with a screen reader. Of course, you&#39;ll need to use the
Chrome browser for this exercise.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://udacity.github.io/ud891/lesson3-semantics-built-in/02-chromevox-lite/&quot; rel=&quot;noopener&quot;&gt;ChromeVox lite demo page&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can use the control panel at the bottom of the screen to control the screen
reader. This screen reader has very minimal functionality, but you can explore
the content using the &lt;code&gt;Previous&lt;/code&gt; and &lt;code&gt;Next&lt;/code&gt; buttons, and you can click things
using the &lt;code&gt;Click&lt;/code&gt; button.&lt;/p&gt;
&lt;p&gt;Try using this page with ChromeVox lite enabled to get a feel for screen reader
use. Think about the fact that a screen reader (or other assistive technology)
actually creates a complete alternate user experience for the user based on the
programmatically expressed semantics. Instead of a visual interface, the screen
reader provides an audible interface.&lt;/p&gt;
&lt;p&gt;Notice how the screen reader tells you some information about each interface
element. You should expect a well-designed reader to tell you all, or at least
most, of the following information about the elements it encounters.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The element&#39;s &lt;em&gt;role&lt;/em&gt; or type, if it is specified (it should be).&lt;/li&gt;
&lt;li&gt;The element&#39;s &lt;em&gt;name&lt;/em&gt;, if it has one (it should).&lt;/li&gt;
&lt;li&gt;The element&#39;s &lt;em&gt;value&lt;/em&gt;, if it has one (it may or may not).&lt;/li&gt;
&lt;li&gt;The element&#39;s &lt;em&gt;state&lt;/em&gt;, e.g., whether it is enabled or disabled (if
applicable).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The screen reader is able to construct this alternate UI because the native
elements contain built-in accessibility metadata. Just as the rendering engine
uses the native code to construct a visual interface, the screen reader uses the
metadata in the DOM nodes to construct an accessible version, something like
this.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;A screen reader uses the DOM to create accessible nodes.&quot; decoding=&quot;async&quot; height=&quot;306&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 800px) 800px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=1428 1428w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/9saR7Av4b4h2RwXjNiEM.png?auto=format&amp;w=1600 1600w&quot; width=&quot;800&quot; /&gt;
&lt;/figure&gt;
</content>
    <author>
      <name>Meggin Kearney</name>
    </author><author>
      <name>Dave Gash</name>
    </author><author>
      <name>Alice Boxhall</name>
    </author>
  </entry>
  
  <entry>
    <title>Text Alternatives for Images</title>
    <link href="https://web.dev/text-alternatives-for-images/"/>
    <updated>2016-10-04T00:00:00Z</updated>
    <id>https://web.dev/text-alternatives-for-images/</id>
    <content type="html" mode="escaped">&lt;p&gt;Images are an important component of most web pages, and are of course a
particular sticking point for low-vision users. We must consider the role an
image plays in a page to work out what type of text alternative it should have.
Take a look at this image.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;article&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;h2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Study shows 9 out of 10 cats quietly judging their owners as they sleep&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;h2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;imgs/160204193356-01-cat-500.jpg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;article&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h2 id=&quot;study-shows-9-out-of-10-cats-quietly-judging-their-owners-as-they-sleep&quot;&gt;Study shows 9 out of 10 cats quietly judging their owners as they sleep &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/text-alternatives-for-images/#study-shows-9-out-of-10-cats-quietly-judging-their-owners-as-they-sleep&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;figure&gt;
&lt;img alt=&quot;cat&quot; decoding=&quot;async&quot; height=&quot;250&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 400px) 400px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/y9kqrXvh2GbMLAfvGANE.jpg?auto=format&amp;w=800 800w&quot; width=&quot;400&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;In the page we have a picture of a cat, illustrating an article on cats&#39;
well-known judgmental behavior. A screen reader will announce this image using
its literal name, &lt;code&gt;&amp;quot;/160204193356-01-cat-500.jpg&amp;quot;&lt;/code&gt;. That&#39;s accurate, but not at
all useful.&lt;/p&gt;
&lt;p&gt;You can use the &lt;code&gt;alt&lt;/code&gt; attribute to provide a useful text alternative to this
image — for example, &amp;quot;A cat staring menacingly off into space.&amp;quot;&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/160204193356-01-cat-500.jpg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;alt&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;A cat staring menacingly off into space&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Then the screen reader can announce a succinct description of the image (
seen in the black VoiceOver bar) and the user can choose whether to move on to
the article.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;an image with improved alt text&quot; decoding=&quot;async&quot; height=&quot;303&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 653px) 653px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=1252 1252w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/6UW687JO230zmcTrPwFO.png?auto=format&amp;w=1306 1306w&quot; width=&quot;653&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;A couple of comments about &lt;code&gt;alt&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;alt&lt;/code&gt; allows you to specify a simple string to be used any time the image
isn&#39;t available, such as when the image fails to load, or is accessed by web
crawling bot, or is encountered by a screen reader.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alt&lt;/code&gt; differs from &lt;code&gt;title&lt;/code&gt;, or any type of caption, in that it is &lt;em&gt;only&lt;/em&gt; used
if the image is not available.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Writing useful alt text is a bit of an art. In order for a string to be a usable
text alternative, it needs to convey the same concept as the image, in the same
context.&lt;/p&gt;
&lt;p&gt;Consider a linked logo image in the masthead of a page like those shown above.
We can describe the image pretty accurately as &amp;quot;The Funion logo&amp;quot;.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;logo&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;logo.jpg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;alt&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;The Funion logo&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;It might be tempting to give it a simpler text alternative of &amp;quot;home&amp;quot; or &amp;quot;main
page&amp;quot;, but that does a disservice to both low-vision and sighted users.&lt;/p&gt;
&lt;p&gt;But imagine a screen reader user who wants to locate the masthead logo on the
page; giving it an alt value of &amp;quot;home&amp;quot; actually creates a more confusing
experience. And a sighted user faces the same challenge — figuring out
what clicking the site logo does — as a screen reader user.&lt;/p&gt;
&lt;p&gt;On the other hand, it&#39;s not always useful to describe an image. For example,
consider a magnifying glass image inside a search button that has the text
&amp;quot;Search&amp;quot;. If the text wasn&#39;t there, you would definitely give that image an alt
value of &amp;quot;search&amp;quot;. But because we have the visible text, the screen reader will
pick up and read aloud the word &amp;quot;search&amp;quot;; thus, an identical &lt;code&gt;alt&lt;/code&gt; value on the
image is redundant.&lt;/p&gt;
&lt;p&gt;However, we know that if we leave the &lt;code&gt;alt&lt;/code&gt; text out, we&#39;ll probably hear the
image file name instead, which is both useless and potentially confusing. In
this case you can just use an empty &lt;code&gt;alt&lt;/code&gt; attribute, and the screen reader will
skip the image altogether.&lt;/p&gt;
&lt;div&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;magnifying-glass.jpg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;alt&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;To summarize, all images should have an &lt;code&gt;alt&lt;/code&gt; attribute, but they need not all
have text. Important images should have descriptive alt text that succinctly
describes what the image is, while decorative images should have empty alt
attributes — that is, &lt;code&gt;alt=&amp;quot;&amp;quot;&lt;/code&gt;.&lt;/p&gt;
</content>
    <author>
      <name>Meggin Kearney</name>
    </author><author>
      <name>Dave Gash</name>
    </author><author>
      <name>Alice Boxhall</name>
    </author>
  </entry>
  
  <entry>
    <title>Accessibility</title>
    <link href="https://web.dev/accessibility/"/>
    <updated>2016-06-26T00:00:00Z</updated>
    <id>https://web.dev/accessibility/</id>
    <content type="html" mode="escaped">&lt;p&gt;This document set is a text-based version of part of the content covered in the
&lt;a href=&quot;https://www.udacity.com/course/web-accessibility--ud891&quot; rel=&quot;noopener&quot;&gt;Udacity course on
Accessibility&lt;/a&gt;.
Rather than a direct transcription of the video course, it is meant to be a more
concise treatment of accessibility principles and practices, using the course&#39;s
original content as a base.&lt;/p&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/accessibility/#summary&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Learn what accessibility means and how it applies to web development.&lt;/li&gt;
&lt;li&gt;Learn how to make websites accessible and usable for everyone.&lt;/li&gt;
&lt;li&gt;Learn how to include basic accessibility with minimal development impact.&lt;/li&gt;
&lt;li&gt;Learn what HTML features are available and how to use them to improve
accessibility.&lt;/li&gt;
&lt;li&gt;Learn about advanced accessibility techniques for creating polished
accessibility experiences.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Understanding accessibility, its scope, and its impact can make you a better web
developer. This guide is intended to help you understand how you can make your
websites accessible and usable for everyone.&lt;/p&gt;
&lt;p&gt;&amp;quot;Accessibility&amp;quot; can be difficult to spell, but it doesn&#39;t have to be difficult
to accomplish. In this guide, you will see how to get some easy wins to help
improve accessibility with minimal effort, how you can use what&#39;s built in to
HTML to create more accessible and robust interfaces, and how to leverage some
advanced techniques for creating polished accessible experiences.&lt;/p&gt;
&lt;p&gt;You&#39;ll also find that many of these techniques will help you create interfaces
that are more pleasant and easy to use for &lt;em&gt;all&lt;/em&gt; users, not just for those with
disabilities.&lt;/p&gt;
&lt;p&gt;Of course, many developers have only a hazy understanding of what accessibility
means - something to do with government contracts, checklists, and screen
readers, right? - and there are plenty of misconceptions floating around.
For example, many developers feel that addressing accessibility will force them
to choose between creating a delightful and attractive experience, and one that
is clunky and ugly but accessible.&lt;/p&gt;
&lt;p&gt;That is, of course, not the case at all, so let&#39;s clear that up before we get
into anything else. What do we mean by accessibility, and what are we here to
learn about?&lt;/p&gt;
&lt;h2 id=&quot;what-is-accessibility&quot;&gt;What is accessibility? &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/accessibility/#what-is-accessibility&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Broadly speaking, when we say a site is accessible, we mean that the site&#39;s
content is available, and its functionality can be operated, by literally
&lt;em&gt;anyone&lt;/em&gt;. As developers, it&#39;s easy to assume that all users can see and use a
keyboard, mouse, or touch screen, and can interact with your page content the
same way you do. This can lead to an experience that works well for some people,
but creates issues that range from simple annoyances to show-stoppers for
others.&lt;/p&gt;
&lt;p&gt;Accessibility, then, refers to the experience of users who might be outside the
narrow range of the &amp;quot;typical&amp;quot; user, who might access or interact with things
differently than you expect. Specifically, it concerns users who are
experiencing some type of impairment or disability - and bear in mind that
that experience might be non-physical or temporary.&lt;/p&gt;
&lt;p&gt;For example, although we tend to center our discussion of accessibility on users
with physical impairments, we can all relate to the experience of using an
interface that is not accessible to us for other reasons. Have you ever had a
problem using a desktop site on a mobile phone, or seen the message &amp;quot;This
content is not available in your area&amp;quot;, or been unable to find a familiar menu
on a tablet? Those are all accessibility issues.&lt;/p&gt;
&lt;p&gt;As you learn more, you&#39;ll find that addressing accessibility issues in this
broader, more general sense almost always improves the user experience for
everyone. Let&#39;s look at an example:&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;A form with poor accessibility.&quot; decoding=&quot;async&quot; height=&quot;308&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 575px) 575px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/hcBkdjssb6gqRgOyjpzm.jpg?auto=format&amp;w=1150 1150w&quot; width=&quot;575&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;This form has several accessibility issues.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The text is low contrast, which is hard for low-vision users to read.&lt;/li&gt;
&lt;li&gt;Having labels on the left and fields on the right makes it hard for many
people to associate them, and almost impossible for someone who needs to zoom
in to use the page; imagine looking at this on a phone and having to pan
around to figure out what goes with what.&lt;/li&gt;
&lt;li&gt;The &amp;quot;Remember details?&amp;quot; label isn&#39;t associated with the checkbox, so you have
to tap or click only on the tiny square rather than just clicking the label;
also, someone using a screen reader would have trouble figuring out the
association.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now let&#39;s wave our accessibility wand and see the form with those issues fixed.
We&#39;re going to make the text darker, modify the design so that the labels are
close to the things they&#39;re labeling, and fix the label to be associated with
the checkbox so you can toggle it by clicking the label as well.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt=&quot;A form with improved accessibility.&quot; decoding=&quot;async&quot; height=&quot;319&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 575px) 575px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=964 964w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=1098 1098w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/degxEapMFe6T27SWUZOf.jpg?auto=format&amp;w=1150 1150w&quot; width=&quot;575&quot; /&gt;
&lt;/figure&gt;
&lt;p&gt;Which would you rather use? If you said &amp;quot;the accessible version&amp;quot;, you&#39;re on your
way to understanding a main premise of this guide. Often, something that&#39;s a
complete blocker for a few users is also a pain point for many others, so by
fixing the accessibility issue you improve the experience for everyone.&lt;/p&gt;
&lt;h2 id=&quot;web-content-accessibility-guidelines&quot;&gt;Web Content Accessibility Guidelines &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/accessibility/#web-content-accessibility-guidelines&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Throughout this guide we&#39;ll refer to the &lt;a href=&quot;https://www.w3.org/TR/WCAG20/&quot; rel=&quot;noopener&quot;&gt;Web Content Accessibility Guidelines
(WCAG) 2.0&lt;/a&gt;, a set of guidelines
and best practices put together by accessibility experts to address what
&amp;quot;accessibility&amp;quot; means in a methodical way.&lt;/p&gt;
&lt;p&gt;WCAG is organized around four principles often called by the acronym &lt;em&gt;POUR&lt;/em&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Perceivable&lt;/strong&gt;: Can users perceive the content? This helps us keep in mind
that just because something is perceivable with one sense, such as sight,
that doesn&#39;t mean that all users can perceive it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Operable&lt;/strong&gt;: Can users use UI components and navigate the content? For
example, something that requires a hover interaction cannot be operated by
someone who can&#39;t use a mouse or touch screen.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Understandable&lt;/strong&gt;: Can users understand the content? Can users understand
the interface and is it consistent enough to avoid confusion?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Robust&lt;/strong&gt;: Can the content be consumed by a wide variety of user agents
(browsers)? Does it work with assistive technology?&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While WCAG provides a comprehensive overview of what it means for content to be
accessible, it can also be a bit overwhelming. To help mitigate this, the
&lt;a href=&quot;https://webaim.org/&quot; rel=&quot;noopener&quot;&gt;WebAIM&lt;/a&gt;(Web Accessibility in Mind) group has
distilled the WCAG guidelines into an easy-to-follow checklist, targeted
specifically for web content.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://webaim.org/standards/wcag/checklist&quot; rel=&quot;noopener&quot;&gt;WebAIM checklist&lt;/a&gt;
can give you a short, high-level summary of what you need to implement, while
also linking to the underlying WCAG specification if you need an expanded
definition.&lt;/p&gt;
&lt;p&gt;With this tool in hand, you can chart a direction for your accessibility work
and be confident that, as long as your project meets the outlined criteria, your
users should have a positive experience accessing your content.&lt;/p&gt;
&lt;h2 id=&quot;understanding-users-diversity&quot;&gt;Understanding users&#39; diversity &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/accessibility/#understanding-users-diversity&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When learning about accessibility, it helps to have an understanding of the
diverse range of users in the world and the kinds of accessibility topics that
affect them. To explain further, here&#39;s an informative question/answer session
with Victor Tsaran, a Technical Program Manager at Google, who is totally blind.&lt;/p&gt;
&lt;figure&gt;
  &lt;img alt=&quot;Victor Tsaran.&quot; decoding=&quot;async&quot; height=&quot;250&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 250px) 250px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/EddhO9hBAtpLUVeWXnjA.jpg?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/EddhO9hBAtpLUVeWXnjA.jpg?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/EddhO9hBAtpLUVeWXnjA.jpg?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/EddhO9hBAtpLUVeWXnjA.jpg?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/EddhO9hBAtpLUVeWXnjA.jpg?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/EddhO9hBAtpLUVeWXnjA.jpg?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/EddhO9hBAtpLUVeWXnjA.jpg?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/EddhO9hBAtpLUVeWXnjA.jpg?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/EddhO9hBAtpLUVeWXnjA.jpg?auto=format&amp;w=500 500w&quot; width=&quot;250&quot; /&gt;
  &lt;figcaption&gt;Victor Tsaran&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;hr /&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;What do you work on at Google?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here at Google my job is to help ensure that our products work for all of our
diverse users, regardless of impairment or ability.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;What kinds of impairments do users have?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When we think about the kinds of impairments which would make it difficult for
someone to access our content, many people will immediately picture a blind user
like me. And it&#39;s true, this impairment can really make it frustrating or even
impossible to use a lot of web sites.&lt;/p&gt;
&lt;p&gt;A lot of modern web techniques have the unfortunate side effect of creating
sites which don&#39;t work well with the tools used by blind users to access the
web. However, there is actually more to accessibility than that. We find it
useful think of impairments falling into four broad buckets: visual, motor,
hearing, and cognitive.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Let&#39;s go through those one at a time. Can you give some examples of visual impairments?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Visual impairments can be split into a few categories: Users with no vision,
like me, might use a screen reader, braille, or combination of the two.&lt;/p&gt;
&lt;figure&gt;
  &lt;img alt=&quot;A braille reader.&quot; decoding=&quot;async&quot; height=&quot;297&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 475px) 475px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/C59Cjp5DEIjceMA49Y5g.png?auto=format&amp;w=950 950w&quot; width=&quot;475&quot; /&gt;
  &lt;figcaption&gt;A braille reader&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Now, it&#39;s actually pretty unusual to have literally no vision, but still,
there&#39;s a good chance you know or have met at least one person who can&#39;t see at
all. However there are also a much larger number of what we call low-vision
users.&lt;/p&gt;
&lt;p&gt;This is a broad range, from someone like my wife, who doesn&#39;t have any corneas - so while she can basically see things she has a hard time reading print
and is considered legally blind - to someone who might have just poor
vision and needs to wear very strong prescription glasses.&lt;/p&gt;
&lt;p&gt;There&#39;s a huge range, and so naturally there&#39;s a big range of accommodations
that people in this category use: some do use a screen reader or a braille
display (I&#39;ve even heard of one woman who reads braille displayed on-screen
because it&#39;s easier to see than printed text), or they might use text-to-speech
technology without the full screen reader functionality, or they might use a
screen magnifier which zooms in on part of the screen, or they might just use
their browser zoom to make all the fonts bigger. They might also use
high-contrast options like an operating system high-contrast mode, a
high-contrast browser extension or a high-contrast theme for a website.&lt;/p&gt;
&lt;figure&gt;
  &lt;img alt=&quot;High-contrast mode.&quot; decoding=&quot;async&quot; height=&quot;297&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 475px) 475px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/WG5G5cWGZXAjpriWuIHt.png?auto=format&amp;w=950 950w&quot; width=&quot;475&quot; /&gt;
  &lt;figcaption&gt;High-contrast mode&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;A lot of users even use a combination of these, like my friend Laura who uses a
combination of high-contrast mode, browser zoom and text-to-speech.&lt;/p&gt;
&lt;p&gt;Low vision is something a lot of people can relate to. For a start, we all
experience deteriorating vision as we age, so even if you haven&#39;t experienced it
there&#39;s a good chance you&#39;ve heard your parents complain about it. But a lot of
people experience the frustration of taking their laptop out by a sunny window
only to find they suddenly can&#39;t read anything! Or anyone who&#39;s had laser
surgery or maybe just has to read something from across the room might have used
one of those accommodations I mentioned. So I think it&#39;s pretty easy for
developers to have some empathy for low-vision users.&lt;/p&gt;
&lt;p&gt;Oh, and I shouldn&#39;t forget to mention people with poor color vision -
about 9% of males have some form of color vision deficiency! Plus about 1% of
females. They may have trouble distinguishing red and green, or yellow and blue.
Think about that the next time you design form validation.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;What about motor impairments?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, motor impairments, or dexterity impairments. This group ranges all the way
from those who would prefer not to use a mouse, because perhaps they&#39;ve had some
RSI or something and find it painful, to someone who may be physically paralyzed
and have limited range of motion for certain parts of their body.&lt;/p&gt;
&lt;figure&gt;
  &lt;img alt=&quot;A person using an eye tracking device.&quot; decoding=&quot;async&quot; height=&quot;297&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 475px) 475px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/BLk6WCwCOprDmAoTky4F.png?auto=format&amp;w=950 950w&quot; width=&quot;475&quot; /&gt;
  &lt;figcaption&gt;An eye tracking device&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Motor impaired users may use a keyboard, switch device, voice control, or even
an eye-tracking device to interact with their computer.&lt;/p&gt;
&lt;p&gt;Similar to vision impairments, mobility can also be a temporary or situational
issue: Maybe you have a broken wrist on your mouse hand. Maybe the trackpad is
broken on your laptop, or you&#39;re just riding on a shaky train. There can be a
lot of situations where a user&#39;s mobility is impeded, and by making sure we
cater for them we improve the experience overall, both for anyone with a
permanent impairment but also for anyone who temporarily finds that they can&#39;t
use a pointer-based UI.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Great, let&#39;s talk about hearing impairments.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This group can range from the profoundly deaf through to hard-of-hearing. And
much like eyesight, our hearing tends to degrade with age. Many of us use common
affordances like hearing aids to help us.&lt;/p&gt;
&lt;figure&gt;
  &lt;img alt=&quot;A television with captions at the bottom.&quot; decoding=&quot;async&quot; height=&quot;297&quot; loading=&quot;lazy&quot; sizes=&quot;(min-width: 475px) 475px, calc(100vw - 48px)&quot; src=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&quot; srcset=&quot;https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=200 200w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=228 228w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=260 260w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=296 296w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=338 338w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=385 385w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=439 439w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=500 500w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=571 571w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=650 650w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=741 741w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=845 845w, https://web-dev.imgix.net/image/T4FyVKpzu4WKF1kBNvXepbi08t52/vci6EjBFLKfUPrifdIKh.png?auto=format&amp;w=950 950w&quot; width=&quot;475&quot; /&gt;
  &lt;figcaption&gt;Screen captions&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;For hearing-impaired users we need to make sure that we&#39;re not relying on
sound, so making sure to use things like video captions and transcripts, and
providing some kind of alternative, if sound is part of the interface.&lt;/p&gt;
&lt;p&gt;And like we saw with vision and motor impairments, it&#39;s really easy to imagine
a situation where someone whose ears work fine would benefit from these
accommodations as well. A lot of my friends say they love it when videos have
captions and transcripts because it means that if they&#39;re in an open plan office
and didn&#39;t bring their headphones, they can still watch the video!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;All right, can you tell us a bit about cognitive impairments?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There&#39;s a range of cognitive conditions like ADD, Dyslexia, and Autism,
which can mean that people want or need to access things differently. The
accommodations for these groups are naturally extremely diverse, but we
definitely find some overlap with other areas, like using zoom functionality to
make reading or concentrating easier. Also, these users may find that really
minimal design works best because it minimizes distraction and cognitive load.&lt;/p&gt;
&lt;p&gt;I think everyone can relate to the stress of cognitive overload, so it&#39;s
obvious that if we create something that works well for someone with a cognitive
impairment, we&#39;re going to be creating something which is going to be a pleasant
experience for everyone.&lt;/p&gt;
&lt;p&gt;So, how would you summarize how you think about accessibility?&lt;/p&gt;
&lt;p&gt;When you look at the broad range of abilities and disabilities that people
might have, you can see that designing and building products only for people who
have perfect vision, hearing, dexterity, and cognition seems incredibly narrow.
It&#39;s almost self-defeating, because we&#39;re creating a more stressful and less
usable experience for everyone, and for some users creating an experience which
actually excludes them altogether.&lt;/p&gt;
&lt;p&gt;In this interview, Victor identified a range of impairments, and placed them
into four broad categories: &lt;em&gt;visual&lt;/em&gt;, &lt;em&gt;motor&lt;/em&gt;, &lt;em&gt;hearing&lt;/em&gt;, and &lt;em&gt;cognitive&lt;/em&gt;. He
also pointed out that each type of impairment might be &lt;em&gt;situational&lt;/em&gt;,
&lt;em&gt;temporary&lt;/em&gt;, or &lt;em&gt;permanent&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Let&#39;s take a look at some real-world examples of access impairments and see
where they fall within those categories and types. Note that some impairments
may fall into more than one category or type.&lt;/p&gt;
&lt;table&gt;
  &lt;tr&gt;
    &lt;th&gt;&lt;/th&gt;
    &lt;th&gt;Situational&lt;/th&gt;
    &lt;th&gt;Temporary&lt;/th&gt;
    &lt;th&gt;Permanent&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;Visual&lt;/th&gt;
    &lt;td&gt;&lt;/td&gt;
    &lt;td&gt;concussion&lt;/td&gt;
    &lt;td&gt;blindness&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;Motor&lt;/th&gt;
    &lt;td&gt;holding a baby&lt;/td&gt;
    &lt;td&gt;broken arm, RSI*&lt;/td&gt;
    &lt;td&gt;RSI*&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;Hearing&lt;/th&gt;
    &lt;td&gt;noisy office&lt;/td&gt;
    &lt;td&gt;&lt;/td&gt;
    &lt;td&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;Cognitive&lt;/th&gt;
    &lt;td&gt;&lt;/td&gt;
    &lt;td&gt;concussion&lt;/td&gt;
    &lt;td&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;Repetitive Strain Injury: e.g., carpal tunnel syndrome, tennis elbow, trigger
finger&lt;/p&gt;
&lt;h2 id=&quot;next-steps&quot;&gt;Next steps &lt;a class=&quot;headline-link&quot; href=&quot;https://web.dev/accessibility/#next-steps&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We&#39;ve covered quite a bit of ground already! You have read about&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;what accessibility is and why it matters for everyone&lt;/li&gt;
&lt;li&gt;the WCAG and the WebAIM accessibility checklist&lt;/li&gt;
&lt;li&gt;different types of impairments you should consider&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the rest of the guide, we&#39;ll dive into the practical aspects of creating
accessible web sites. We&#39;ll organize this effort around three main subject
areas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://web.dev/focus/&quot;&gt;&lt;strong&gt;Focus&lt;/strong&gt;&lt;/a&gt;: We&#39;ll look at how to
build things that can be operated with a keyboard instead of a mouse. This is
important for users with motor impairments, of course, but it also ensures
that your UI is in good shape for all users.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://web.dev/semantics-builtin/&quot;&gt;&lt;strong&gt;Semantics&lt;/strong&gt;&lt;/a&gt;: We&#39;ll
make sure that we express our user interface in a robust way that works with
a variety of assistive technologies.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://web.dev/accessible/#create-a-design-and-css-that-supports-users-with-different-needs&quot;&gt;&lt;strong&gt;Styling&lt;/strong&gt;&lt;/a&gt;: We&#39;ll consider visual
design and look at some techniques for making the visual elements of the
interface as flexible and usable as possible.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each of those subjects could fill a whole course, so we won&#39;t cover every aspect
of creating accessible web sites. However, we&#39;ll give you enough information to
get started, and point you to some good places where you can learn more about
each topic.&lt;/p&gt;
</content>
    <author>
      <name>Meggin Kearney</name>
    </author><author>
      <name>Dave Gash</name>
    </author><author>
      <name>Alice Boxhall</name>
    </author><author>
      <name>Rob Dodson</name>
    </author>
  </entry>
</feed>
