<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Frank van Eldijk-Smeding</title>
    <description>The latest articles on DEV Community by Frank van Eldijk-Smeding (@beingfrankly).</description>
    <link>https://dev.to/beingfrankly</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F609357%2F2b263cc3-335a-4d8e-be51-55849098828e.png</url>
      <title>DEV Community: Frank van Eldijk-Smeding</title>
      <link>https://dev.to/beingfrankly</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/beingfrankly"/>
    <language>en</language>
    <item>
      <title>Are our links visually accessible?</title>
      <dc:creator>Frank van Eldijk-Smeding</dc:creator>
      <pubDate>Thu, 25 Aug 2022 12:59:00 +0000</pubDate>
      <link>https://dev.to/beingfrankly/are-our-links-visually-accessible-fbc</link>
      <guid>https://dev.to/beingfrankly/are-our-links-visually-accessible-fbc</guid>
      <description>&lt;p&gt;When I wrote about &lt;a href="https://beingfrankly.nl/blog/how-accessible-are-links"&gt;the accessibility of links&lt;/a&gt;, I’ve focused on screen reader &amp;amp; voice recognition users. But this time I’ll focus on what visually goes wrong for our links.&lt;/p&gt;

&lt;p&gt;So, let’s get started and figure out what those barriers are and what we can do to prevent them from happening.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple link inside a paragraph, what could go wrong?
&lt;/h2&gt;

&lt;p&gt;While browsing the web, I keep noticing a design trend more often than before. And that’s the styling of their links.&lt;/p&gt;

&lt;p&gt;Having only a color difference to separate them from the rest of the content. You might wonder what’s wrong with only using a color to convey meaning, so let’s find out together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lost in a sea of text
&lt;/h2&gt;

&lt;p&gt;I’ll show you two examples, both showing two paragraphs and a link somewhere in the middle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--znVsf08z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://storage.googleapis.com/beingfrankly/only_color.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--znVsf08z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://storage.googleapis.com/beingfrankly/only_color.png" alt="Both examples show the same two paragraphs with a link in the middle. The visual cue for the link is only a difference in color. In the first example it’s orange and in the second example it’s almost dark yellow, which almost looks the same as the rest of the content." width="880" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first example is what people without a &lt;strong&gt;color vision deficiency&lt;/strong&gt; (better known as &lt;strong&gt;color blindness&lt;/strong&gt;) see. And with the second example I’ve simulated a type of &lt;strong&gt;color vision deficiency&lt;/strong&gt; called &lt;a href="https://www.color-blindness.com/protanopia-red-green-color-blindness/"&gt;Protanopia&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Do note that the simulated effect might differ from reality. This is due to a lot of factors (e.g. the algorithm used, severity of the color vision deficiency, monitor settings, etc).&lt;/p&gt;

&lt;p&gt;Are you able to spot the link in the second example? I bet it wasn’t as easy as the first example. So, what could we do to prevent this from happening?&lt;/p&gt;

&lt;h2&gt;
  
  
  More weight please
&lt;/h2&gt;

&lt;p&gt;So, what about giving our links more &lt;code&gt;font-weight&lt;/code&gt;? Surely that will solve the problem, right?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6whOTgH2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://storage.googleapis.com/beingfrankly/bolded.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6whOTgH2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://storage.googleapis.com/beingfrankly/bolded.png" alt="Both examples show the same two paragraphs with a link in the middle. The link is now bold and is still a different color than the rest of the text. However, other words inside the paragraphs have been made bold as well." width="880" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not ideal I’m afraid. Even though the link stands out more compared to the rest of the content. We’ve introduced a new problem. It’s still unclear which is just bolded text and which is the link.&lt;/p&gt;

&lt;h2&gt;
  
  
  Underline to the rescue
&lt;/h2&gt;

&lt;p&gt;What our links — or rather our users — need, is an &lt;code&gt;underline&lt;/code&gt;. It’s still often removed (and I’ve been guilty of this in the past as well) because of aesthetic reasons.&lt;/p&gt;

&lt;p&gt;Yet, it’s the best visual cue for a link that’s available. And most likely, it’s what our users will expect. So, let's add some underlines shall we.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4SbDi03U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://storage.googleapis.com/beingfrankly/underline.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4SbDi03U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://storage.googleapis.com/beingfrankly/underline.png" alt="Both examples show the same two paragraphs with a link in the middle. The link now has an underline, it's bold and uses a different color than the rest of the text." width="880" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In both examples the link stands out, even with a loss of color.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;When we’re developing (or designing) for our users, we shouldn’t use color as the only visual cue&lt;/li&gt;
&lt;li&gt;Using underlines for our links is what our users will expect the most, don’t make them think or second guess!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/WCAG21/#use-of-color"&gt;https://www.w3.org/TR/WCAG21/#use-of-color&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/WAI/WCAG21/Techniques/failures/F73"&gt;https://www.w3.org/WAI/WCAG21/Techniques/failures/F73&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/WAI/WCAG21/Techniques/general/G183"&gt;https://www.w3.org/WAI/WCAG21/Techniques/general/G183&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ux</category>
      <category>webdev</category>
      <category>a11y</category>
    </item>
    <item>
      <title>How accessible are links and buttons?</title>
      <dc:creator>Frank van Eldijk-Smeding</dc:creator>
      <pubDate>Fri, 10 Dec 2021 14:36:59 +0000</pubDate>
      <link>https://dev.to/beingfrankly/how-accessible-are-links-and-buttons-3560</link>
      <guid>https://dev.to/beingfrankly/how-accessible-are-links-and-buttons-3560</guid>
      <description>&lt;p&gt;Links and buttons are one of the main basic elements that you’ll find on any website. Yet, a lot of them are not as accessible as we would like. And we’re bound to make mistakes as developers, if we don't know how they're understood by assistive technologies.&lt;/p&gt;

&lt;p&gt;In this short article I'll focus on screen readers and voice recognition and how they deal with links and buttons. I'll not cover every possible problem that could happen. I'm going to reserve that for a different article which I'll publish soon.&lt;/p&gt;

&lt;p&gt;Before we continue, I want to avoid any confusion upfront. When we’re talking about links or buttons, I assume that they're using the proper semantic element, a &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Using a different HTML element — like a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; which looks like a link or a button — might not be set up right. And this could cause other problems for assistive technologies. If you want to know more on this, I've written an article on why we should &lt;a href="https://beingfrankly.nl/blog/rules-on-using-aria"&gt;prefer semantic HTML&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How assistive technologies understand a web page
&lt;/h2&gt;

&lt;p&gt;This is possible through the use of many accessibility API’s. The platform that the browser runs on uses one of those API’s to read the content of a web page.&lt;/p&gt;

&lt;p&gt;How this process actually works in the background would be too much for this article. If you want to learn the details I recommend you to read &lt;a href="https://www.smashingmagazine.com/2015/03/web-accessibility-with-accessibility-api/"&gt;Web Accessibility with Accessibility API&lt;/a&gt;. It’s a great article written by &lt;a href="https://twitter.com/leoniewatson"&gt;Léonie Watson&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The part that’s important for us to know is that those API's expose certain information. This happens for every object in the DOM. This information is crucial for assistive technologies to understand what each object means.&lt;/p&gt;

&lt;p&gt;There are two pieces of information I want to focus on, and those are the &lt;code&gt;role&lt;/code&gt; and the &lt;code&gt;name&lt;/code&gt;. The &lt;code&gt;role&lt;/code&gt; of the DOM object exposes its purpose. It could be a link, a button or something else like an image. The &lt;code&gt;name&lt;/code&gt; of the DOM object gives its identity. It’s also referred as the &lt;a href="https://www.w3.org/TR/accname-1.1/#dfn-accessible-name"&gt;Accessible Name&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;So, let’s use the example above to quickly recap what we’ve learned.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;&amp;lt;main&amp;gt;&lt;/code&gt; element will have the &lt;code&gt;role&lt;/code&gt; of “main”. The &lt;code&gt;name&lt;/code&gt; is empty because we didn’t supply one.&lt;/li&gt;
&lt;li&gt;Each &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; element will have the &lt;code&gt;role&lt;/code&gt; of “paragraph”. Again the &lt;code&gt;name&lt;/code&gt; is empty since we didn’t supply one.&lt;/li&gt;
&lt;li&gt;Every &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element will have the &lt;code&gt;role&lt;/code&gt; of “link”. The &lt;code&gt;name&lt;/code&gt; will be “Read more”. This happens because the &lt;code&gt;name&lt;/code&gt; — or Accessible Name — is determined from a list of possible options. And in this case it was the value inside the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element that’s used for the Accessible Name.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ve picked this example on purpose because it’s quite common to see a list of cards. Each card having a title, some text and at the bottom a “Read more” link.&lt;/p&gt;

&lt;p&gt;So, let’s see which problems could happen for screen readers &amp;amp; voice recognition if we leave the example above untouched.&lt;/p&gt;

&lt;h2&gt;
  
  
  Potential problems for screen readers &amp;amp; voice recognition
&lt;/h2&gt;

&lt;p&gt;When a sighted user sees a “Read more” link that’s near other elements, they’re able to group them together. The context behind the “Read more” link is then related to the text and the title. It becomes clear what to expect when they press the link. This happens because of the &lt;a href="https://lawsofux.com/law-of-proximity/"&gt;Law of Proximity&lt;/a&gt; and/or the &lt;a href="https://lawsofux.com/law-of-common-region/"&gt;Law of Common Region&lt;/a&gt;, depending on how the elements are visually styled.&lt;/p&gt;

&lt;p&gt;Yet, people who rely on screen readers are usually not able to scan the page, and group elements based on visual proximity. So, in this case the “Read more” link doesn’t have any meaning to them.&lt;/p&gt;

&lt;p&gt;For people who depend on voice recognition, might be able to group elements together. But, they’ll have a different problem. To interact with elements they say “Click” — I’m using Voice Control on MacOS — followed by the Accessible Name of the link. This will then press the element that matches the Accessible Name.&lt;/p&gt;

&lt;p&gt;So, in our first example it would be “Click, Read more”. But, this will number each “Read more” link. Because the voice recognition software doesn’t understand which link they meant.&lt;/p&gt;

&lt;p&gt;Both cases lead up to a poor user experience and could end up in frustration. How could we solve this?&lt;/p&gt;

&lt;h2&gt;
  
  
  The solution (well, one of many)
&lt;/h2&gt;

&lt;p&gt;Well, there are a couple options available to us. But, let’s focus on one solution for now to keep this article brief. I’ll write an in-depth article on a lot more problems/situations and solutions soon.&lt;/p&gt;

&lt;p&gt;If we remove the “Read more” link, we could solve both problems. But, what becomes our link then? Well, the entire card could turn into our link. Then give the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; either an &lt;code&gt;aria-label&lt;/code&gt;, matching the value of our title. Or use an &lt;code&gt;aria-labelledby&lt;/code&gt;, which then refers to our &lt;code&gt;&amp;lt;div class="title"&amp;gt;&lt;/code&gt;. Let’s check it out!&lt;/p&gt;

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

&lt;p&gt;When a screen reader user tabs through the links, or use a shortcut to get a list of links. They’ll hear each link announced with the name of the title instead of “Read more”.&lt;/p&gt;

&lt;p&gt;The problem with voice recognition is also solved. Because it’s now possible to use the command “Click” followed by the name of the title.&lt;/p&gt;

&lt;p&gt;If you’ve liked this piece of content and you want to get regular updates on other things I write about then follow me on &lt;a href="https://twitter.com/frank_vaneldijk"&gt;Twitter&lt;/a&gt;. And if you have any comments or questions then don’t hesitate to DM me!&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Assistive technologies understand the content of a web page through the platform’s accessibility API.&lt;/li&gt;
&lt;li&gt;Links and buttons should be clear on their own, and not depend on their surrounding context to make sense.&lt;/li&gt;
&lt;li&gt;Voice recognition software have shortcuts to interact with elements&lt;/li&gt;
&lt;li&gt;Command “Click” with the name of the label. The label name needs to match the Accessible Name&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>html</category>
      <category>a11y</category>
    </item>
    <item>
      <title>The rules on using ARIA</title>
      <dc:creator>Frank van Eldijk-Smeding</dc:creator>
      <pubDate>Wed, 24 Nov 2021 10:54:38 +0000</pubDate>
      <link>https://dev.to/beingfrankly/the-rules-on-using-aria-583a</link>
      <guid>https://dev.to/beingfrankly/the-rules-on-using-aria-583a</guid>
      <description>&lt;p&gt;In my previous post about &lt;a href="https://beingfrankly.nl/blog/differences-between-aria-labeling-variants"&gt;the differences between the ARIA labeling variants&lt;/a&gt; I mentioned the first rule of &lt;a href="https://www.w3.org/TR/wai-aria/"&gt;ARIA&lt;/a&gt; — which is often mentioned as &lt;strong&gt;“Don’t use ARIA”&lt;/strong&gt; — and that I would dive deeper into the five rules of ARIA.&lt;/p&gt;

&lt;p&gt;If you never heard of ARIA before, let me give you a short introduction. It’s a set of attributes to enable frontend developers create accessible web apps. Look at it as an add-on, or a layer, on top of HTML. Often it’s not necessary to use ARIA because HTML offers a native solution for us. But sometimes our UI components are so complex that they just don’t fit anywhere in the native HTML options. Then it’s time to bring out ARIA and use it to create an accessible experience for everyone.&lt;/p&gt;

&lt;p&gt;But, we should be careful with ARIA, because of its double-edged sword characteristic. When it’s used properly, it greatly improves the user experience. But when it’s used incorrectly — or partially — it could break the user experience. To a point where it's completely unusable.&lt;/p&gt;

&lt;p&gt;Enough about the intro, let’s go over the five rules on how to use ARIA!&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Prefer semantic HTML over ARIA
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;If you &lt;em&gt;can&lt;/em&gt; use a native HTML element or attribute with the semantics and behavior you require &lt;strong&gt;already built in&lt;/strong&gt;, instead of re-purposing an element and adding an ARIA role, state or property to make it accessible, then do so.&lt;br&gt;
– W3C, &lt;a href="https://www.w3.org/TR/using-aria/#firstrule"&gt;First rule of ARIA&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We should prefer to use the semantic HTML option, if it's available to us. We shouldn’t opt for ARIA for the sake of using ARIA. Although the intent of ARIA is to make things accessible, it’s not the only option available to us. It’s still the only option when things get complex in the UI. But, we have to remember that ARIA came before HTML 5. And when HTML 5 came, it introduced a lot of semantic elements that we no longer have to reproduce through ARIA.&lt;/p&gt;

&lt;p&gt;Let’s elaborate on this further with an example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let’s not do this&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;role=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;This is a button&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Let’s do this instead&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&amp;gt;&lt;/span&gt;This is a button&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What’s the difference between &lt;code&gt;role="button"&lt;/code&gt; and &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; in this example? They’re the same semantic wise. Both elements should are buttons. So why should we prefer semantic HTML over ARIA? Well, if we would use the &lt;code&gt;role="button"&lt;/code&gt; approach we’re not even halfway of what a semantic &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; would give us.&lt;/p&gt;

&lt;p&gt;Let’s take the &lt;code&gt;&amp;lt;div role="button"&amp;gt;&lt;/code&gt; example and see what’s missing, step by step. The element has its role, so it's recognised as a button. But we can’t focus this element with a keyboard, because there’s no &lt;code&gt;tabindex&lt;/code&gt; attribute present. Which the &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; would have given us, out of the box.&lt;/p&gt;

&lt;p&gt;It's not only focus management we're missing. It's also the keyboard functionality for interacting with the button that's missing. For instance, when a button has focus, we should be able to press the Space key to activate the button. To check which other interactions we’re missing out on I recommend to read &lt;a href="https://www.w3.org/TR/wai-aria-practices-1.1/#button"&gt;the design patterns for a button&lt;/a&gt; from W3C.&lt;/p&gt;

&lt;p&gt;In short, let’s use semantic HTML over ARIA, so that we don't have to do the work! This is the main takeaway that I want to give you.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Don’t alter the meaning of a semantic HTML element
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Do not change native semantics, unless you really have to.&lt;br&gt;
– W3C, &lt;a href="https://www.w3.org/TR/using-aria/#secondtrule"&gt;Second rule of ARIA&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When we use a semantic HTML element its meaning has been &lt;strong&gt;implicitly&lt;/strong&gt; given by the element. In other words, a &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; has the role of a “button”. But, what happens if we’re using that same &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; and we give it the ARIA &lt;code&gt;role="header"&lt;/code&gt;? Well, we've &lt;strong&gt;explicitly&lt;/strong&gt; gave it a different meaning. And this could lead to unwanted side effects.&lt;/p&gt;

&lt;p&gt;Let’s take an unordered list, &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;, as an example. Everything we expect from an &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; are right. For instance, it should have a list of &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;. And if we leave it at that, screen readers will be able to understand it. We enable the screen reader to announce how many list items are present. And it will then proceed to announce each list item one by one.&lt;/p&gt;

&lt;p&gt;But, wen we add the &lt;code&gt;role="navigation"&lt;/code&gt; on the &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;, it becomes a &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role"&gt;navigation landmark&lt;/a&gt;. The semantics are overridden. and screen readers have lost the ability to do what they could do before. Leaving screen reader users guessing what it means.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. All interactive elements must be usable by a keyboard
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;All interactive ARIA controls must be usable with the keyboard.&lt;br&gt;
– W3C, &lt;a href="https://www.w3.org/TR/using-aria/#3rdrule"&gt;Third rule of ARIA&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The third rule is somewhat linked to the first rule. Let’s use example from the first rule — the &lt;code&gt;&amp;lt;div role="button"&amp;gt;&lt;/code&gt; — to explain how they relate to each other. We’ve learned, in the first rule, that when we use the &lt;code&gt;role&lt;/code&gt; attribute that we're not done. That we don't have any keyboard functionality. So again, for this rule it's best to go for the semantic HTML element. Because by doing so, we gain the keyboard functionality out of the box.&lt;/p&gt;

&lt;p&gt;But, what if we have a complex UI component — often referred as a custom widget — which needs to be interactive. Well, we first need to determine what our complex UI component should act as. To do that we could visit the &lt;a href="https://www.w3.org/TR/wai-aria-practices-1.1/#aria_ex"&gt;design patterns&lt;/a&gt; and see how it fits. From there we could check which keyboard interactions are expected. In other words, what do we expect to happen when we press the Space key.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Focusable elements shouldn’t be hidden
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Do not use &lt;code&gt;role="presentation"&lt;/code&gt; or &lt;code&gt;aria-hidden="true"&lt;/code&gt; on a &lt;strong&gt;focusable&lt;/strong&gt; element.&lt;br&gt;
– W3C, &lt;a href="https://www.w3.org/TR/using-aria/#4thrule"&gt;Fourth rule of ARIA&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The fourth rule focusses — no pun intended, I swear — on ensuring that focusable elements are present in the &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Accessibility_tree"&gt;Accessibility Tree&lt;/a&gt;. Otherwise, they're hidden from assistive technologies (e.g. a screen reader).&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;aria-hidden="true"&lt;/code&gt;, &lt;code&gt;role="presentation"&lt;/code&gt; and &lt;code&gt;role="none"&lt;/code&gt; attributes may look similar. But their intent is quite different!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;aria-hidden="true"&lt;/code&gt; will remove the element and all its child elements from the accessibility API. This means that it won’t show up in the Accessibility Tree. And if it’s not present there then it’s invisible to assistive technologies.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;role="presentation"&lt;/code&gt; and &lt;code&gt;role="none"&lt;/code&gt; will remove the semantic meaning of an element while still exposing it to assistive technology.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;The &lt;code&gt;role="presentation"&lt;/code&gt; and &lt;code&gt;role="none"&lt;/code&gt; attributes are the same. The &lt;code&gt;role="none"&lt;/code&gt; attribute is actually an alias for &lt;code&gt;role="presentation"&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When the button has the &lt;code&gt;aria-hidden="true"&lt;/code&gt; attribute, it’s still present in the HTML DOM. So it's still possible to focus the button with a keyboard. But, when we navigate with the screen reader, it will not know of the button's existence.&lt;/p&gt;

&lt;p&gt;We shouldn't use the &lt;code&gt;aria-hidden="true"&lt;/code&gt; attribute on any focusable or interactive element. Because it will then be impossible to focus or interact with such elements for a lot of people.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. All interactive elements require an Accessible Name
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;All interactive elements must have an accessible name.&lt;br&gt;
– W3C, &lt;a href="https://www.w3.org/TR/using-aria/#fifthrule"&gt;Fifth rule of ARIA&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;All &lt;a href="https://html.spec.whatwg.org/#interactive-content-2"&gt;interactive elements&lt;/a&gt; (e.g. an &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;) require an Accessible Name. Otherwise, assistive technologies have no clue what the interactive element means.&lt;/p&gt;

&lt;p&gt;Let’s take a plain &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; with a &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; next to it, which acts as the visual label. So no &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;, &lt;code&gt;aria-label&lt;/code&gt; or &lt;code&gt;aria-labelledby&lt;/code&gt;. What would a screen reader announce, when the user has focus on the input?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;Username&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Voice Over on MacOS would say something like: Edit text&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The screen reader user is confused and needs to guess what the input means, since they can only hear “Edit text”.&lt;/p&gt;

&lt;p&gt;This would impact voice recognition users (e.g. VoiceControl on MacOS) as well. If the Accessible Name is present, then it's possible to interact with the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; element directly. For example, with the VoiceOver command: “Click [insert accessible name]”. If the Accessible Name isn't available, they need to resort to other means to interact with the element. Which could seriously affect their user experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  How could we provide the Accessible Name?
&lt;/h3&gt;

&lt;p&gt;There are three separate techniques to provide the Accessible Name:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;For &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; we provide the Accessible Name through the link text/button value we’ve given them&lt;/li&gt;
&lt;li&gt;For &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; elements we provide the Accessible Name through either a explicit &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;, &lt;code&gt;aria-label&lt;/code&gt; or the &lt;code&gt;aria-labelledby&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;For anything else (e.g. custom elements, landmarks, etc) we provide the Accessible Name either through &lt;code&gt;aria-label&lt;/code&gt; or the &lt;code&gt;aria-labelledby&lt;/code&gt; attributes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you’ve liked this piece of content and you want to get regular updates on other things I write about then follow me on &lt;a href="https://twitter.com/frank_vaneldijk"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;You’ve made it to the end! That was quite a lot of information on how we should use ARIA. So, let’s summarise all the things we’ve learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prefer semantic HTML over ARIA, because they’ll do the hard work for us!&lt;/li&gt;
&lt;li&gt;When we use ARIA instead, check the &lt;a href="https://www.w3.org/TR/wai-aria-practices-1.1/"&gt;design patterns&lt;/a&gt; to check what’s expected.&lt;/li&gt;
&lt;li&gt;We shouldn’t alter the meaning of semantic HTML, otherwise we could end up having nasty side effects&lt;/li&gt;
&lt;li&gt;Keyboard focus/navigation isn’t the same as screen reader focus/navigation&lt;/li&gt;
&lt;li&gt;We shouldn’t hide focusable elements, otherwise they’re not usable for assistive technologies&lt;/li&gt;
&lt;li&gt;All interactive elements should have an Accessible Name. Otherwise, (again) it won’t be usable for assistive technologies&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>html</category>
      <category>a11y</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The differences between the ARIA labeling variants</title>
      <dc:creator>Frank van Eldijk-Smeding</dc:creator>
      <pubDate>Thu, 21 Oct 2021 08:19:42 +0000</pubDate>
      <link>https://dev.to/beingfrankly/the-differences-between-the-aria-labeling-variants-33n5</link>
      <guid>https://dev.to/beingfrankly/the-differences-between-the-aria-labeling-variants-33n5</guid>
      <description>&lt;h1&gt;
  
  
  The differences between the ARIA labeling variants
&lt;/h1&gt;

&lt;p&gt;In this bite sized post, I’m going to take the time to explain the differences between &lt;code&gt;aria-label&lt;/code&gt;, &lt;code&gt;aria-labelledby&lt;/code&gt; and &lt;code&gt;aria-describedby&lt;/code&gt;. Before I read the documentation on these attributes, they confused me because they seem so similar, while there are, in fact, some crucial differences between the three. I hope by the end of this post you’ll know when and how to use these three attributes.&lt;/p&gt;

&lt;p&gt;Before I go on and explain the differences, I do want to stress something out which is the first rule of using ARIA: &lt;strong&gt;Don't use ARIA&lt;/strong&gt;. This almost sounds like the &lt;a href="https://www.rottentomatoes.com/m/fight_club/quotes/#:~:text=to%20Fight%20Club.-,The%20first%20rule%20of%20Fight%20Club%20is%3A%20you%20do%20not,out%2C%20the%20fight%20is%20over."&gt;first rule of Fight club&lt;/a&gt;. I’ll be honest here and say that I found this rather confusing in the beginning. Only after reading about it and understanding the intent behind the rule did it click with me. I think it might have been better to name the first rule like this: &lt;strong&gt;Prefer native HTML over ARIA&lt;/strong&gt;. We shouldn’t use ARIA attributes without considering using the semantic HTML element first. I’ll dive deeper into the five rules of using ARIA in a different post since it’s beyond the scope of this topic.&lt;/p&gt;

&lt;h2&gt;
  
  
  The aria-label
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;aria-label&lt;/code&gt; attribute is somewhat similar to the &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; element. It doesn't have some of the advantages that the &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; element has, but its purpose is the same. Giving context, through the &lt;a href="https://www.w3.org/TR/accname-1.2/"&gt;Accessible Name&lt;/a&gt;, to the element it's associated with.&lt;/p&gt;

&lt;p&gt;Unlike the &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; element (which is its own element) the &lt;code&gt;aria-label&lt;/code&gt; attribute needs to be put on the element itself. It could look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Close"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;svg&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- svg content --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;aria-label&lt;/code&gt; attribute takes a string value, which is then used to create the Accessible Name for the &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; element. The common use case for the &lt;code&gt;aria-label&lt;/code&gt; attribute is when we’re not able to use the native &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; element, while still providing context for the Accessible Name.&lt;/p&gt;

&lt;h2&gt;
  
  
  The aria-labelledby
&lt;/h2&gt;

&lt;p&gt;Although the &lt;code&gt;aria-labelledby&lt;/code&gt; attribute may look similar to &lt;code&gt;aria-label&lt;/code&gt;, it works quite different. Instead of a string value, it requires the ID of the element we’re referencing.&lt;/p&gt;

&lt;p&gt;Let’s say we would want to give meaning to the &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; through the ID of the &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt;element. It would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;aria-labelledby=&lt;/span&gt;&lt;span class="s"&gt;"close-icon"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Close"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"close-icon"&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- svg content --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We could view &lt;code&gt;aria-labelledby&lt;/code&gt;, in this regard, that it’s inheriting the context from the &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt;. The benefit of this approach is that we gain flexibility on how we give meaning to our &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;. The bad part of this approach is that the &lt;a href="https://a11ysupport.io/tech/aria/aria-labelledby_attribute"&gt;support isn’t that great&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Another big difference, over the &lt;code&gt;aria-label&lt;/code&gt;, is that it could also accept a space-separated list of element IDs. This lets us “build” a certain context from different parts of the UI. For now I haven’t found a practical example to go with this.&lt;/p&gt;

&lt;h2&gt;
  
  
  The aria-describedby
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;aria-describedby&lt;/code&gt; attribute is used to add a description for the element it’s used on. I wanted to include this attribute as well next to the &lt;code&gt;aria-label&lt;/code&gt; and &lt;code&gt;aria-labelledby&lt;/code&gt; since there’s some confusion on what they mean and when we should use them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"password-input"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Password&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"password-input"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;aria-describedby=&lt;/span&gt;&lt;span class="s"&gt;"password-input-description"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"password-input-description"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Password must contain at least 8 characters&lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the example I’ve used the &lt;code&gt;aria-describedby&lt;/code&gt; attribute to give a description to a password input. And because we’ve attached the description to the input field it will be recognized by the screen reader, enabling it to announce the description after the label of the input.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Voice Over on MacOS would announce something like this: Password, secure edit text. Password must contain at least 8 characters.&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;aria-label&lt;/code&gt; attribute accepts a string value which provides the &lt;strong&gt;Accessible Name&lt;/strong&gt; on the element it’s used on&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;aria-labelledby&lt;/code&gt; attribute accepts either a single ID or multiple ID’s which will be used for the &lt;strong&gt;Accessible Name&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;We should only use the &lt;code&gt;aria-label&lt;/code&gt;, &lt;code&gt;aria-labelledby&lt;/code&gt; and &lt;code&gt;aria-describedby&lt;/code&gt; on interactive elements, landmarks or elements that have an explicit&lt;/li&gt;
&lt;li&gt;When both &lt;code&gt;aria-label&lt;/code&gt; and &lt;code&gt;aria-labelledby&lt;/code&gt; attributes are present on the same element, the value of &lt;code&gt;aria-labelledby&lt;/code&gt; will take priority&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Further reading
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/WCAG20-TECHS/ARIA16.html"&gt;w3 - Using aria-labelledby to provide a name for user interface controls&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/WCAG20-TECHS/ARIA9"&gt;w3 - Using aria-labelledby to concatenate a label from several text nodes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-labelledby_attribute"&gt;MDN - Using the aria-labelledby attribute&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/wai-aria/#aria-label"&gt;WAI-ARIA - documentaion on aria-label&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/wai-aria/#aria-labelledby"&gt;WAI-ARIA - documentation on aria-labelledby&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>html</category>
      <category>a11y</category>
    </item>
    <item>
      <title>How to have an accessible input while the label isn’t present?</title>
      <dc:creator>Frank van Eldijk-Smeding</dc:creator>
      <pubDate>Sun, 03 Oct 2021 19:20:19 +0000</pubDate>
      <link>https://dev.to/beingfrankly/how-to-have-an-accessible-input-while-the-label-isn-t-present-3cm8</link>
      <guid>https://dev.to/beingfrankly/how-to-have-an-accessible-input-while-the-label-isn-t-present-3cm8</guid>
      <description>&lt;p&gt;In another bite-sized post I want to take the time to cover a common UI pattern that you’ll find on almost every website. Which is an input field with no visual label at all. Just a placeholder and perhaps with an icon. &lt;/p&gt;

&lt;p&gt;I'll explain what's missing or what's flawed with the approaches you'll see on on most websites. As an example we’ll use a search field since it's quite common and it fits the UI pattern quite well.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bare essentials and why it's flawed to begin with
&lt;/h2&gt;

&lt;p&gt;Let's dive into a basic search field example which represents this pattern. An input with no label.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;role=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Find repositories.."&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Perhaps you've noticed — or you already know this — that the input element has &lt;code&gt;search&lt;/code&gt; as its type instead of &lt;code&gt;text&lt;/code&gt;, and you might expect the latter. The difference of using &lt;code&gt;search&lt;/code&gt; over &lt;code&gt;text&lt;/code&gt; is that the user is able to reset the search query through the &lt;strong&gt;Esc&lt;/strong&gt; key and it’s announced as a search&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So our search field has a &lt;code&gt;placeholder&lt;/code&gt; with &lt;strong&gt;”Find repositories..“&lt;/strong&gt;.  It doesn't have a &lt;code&gt;label&lt;/code&gt; associated with the input field, because why should we have one if it's visually not there. Right?&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s so flawed about it?
&lt;/h2&gt;

&lt;p&gt;You might wonder what the problems are with the example above? Well, in this example there’s two problems I’ll cover.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The &lt;code&gt;placeholder&lt;/code&gt; is used as a substitute for the &lt;code&gt;label&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;People who use Voice Control, or something similiar, aren’t able to interact directly with the search field.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Placeholder shenanigans
&lt;/h3&gt;

&lt;p&gt;When you do a search for &lt;strong&gt;placeholder&lt;/strong&gt; combined with &lt;strong&gt;accessibility&lt;/strong&gt;, you'll see a lot of articles on why you shouldn't use placeholders to begin with. This is because the &lt;code&gt;placeholder&lt;/code&gt; attribute is tied to a lot of accessible problems. I’ll cover those problems on a different time because it’s beyond the scope of this post. &lt;/p&gt;

&lt;p&gt;The main takeaway I want to share about the &lt;code&gt;placeholder&lt;/code&gt; attribute is that we shouldn’t depend on it. The intent of a &lt;code&gt;placeholder&lt;/code&gt; isn’t the same as the intent of a &lt;code&gt;label&lt;/code&gt;. And this is important for assistive technologies, like screen readers. To give you an example. In 2019 JAWS, one the biggest screen readers&lt;sup id="fnref1"&gt;1&lt;/sup&gt;, changed how they processed the &lt;code&gt;placeholder&lt;/code&gt; attribute. Before this change the &lt;code&gt;placeholder&lt;/code&gt; attribute was completely ignored.&lt;/p&gt;

&lt;h3&gt;
  
  
  Voice Control can’t be fully utilised
&lt;/h3&gt;

&lt;p&gt;The second problem is that assistive technology like Voice Control can’t interact with the search field directly. What do I mean by that? Well, it's not possible to use the command &lt;strong&gt;“Click search”&lt;/strong&gt;. This command in Voice Control lets you select any interactive element based on the name of the &lt;code&gt;label&lt;/code&gt;. Considering that we don't have a label (yet), we're not able to use this command.&lt;/p&gt;

&lt;h2&gt;
  
  
  So how could we solve this?
&lt;/h2&gt;

&lt;p&gt;We have a couple of options at our disposal:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The first option is to add an explicit &lt;code&gt;label&lt;/code&gt;. If you want to read more on what an explicit &lt;code&gt;label&lt;/code&gt; is and how we could add them: &lt;a href="https://www.beingfrankly.nl/blog/the-what-why-and-how-behind-labels"&gt;The what, why and how on labels&lt;/a&gt;.  The twist in this situation, however, is that we’ll hide the label visually through CSS.&lt;/li&gt;
&lt;li&gt;As a second option we could use the  &lt;code&gt;aria-label&lt;/code&gt; attribute. This doesn’t require any CSS magic to hide it since the &lt;code&gt;aria-label&lt;/code&gt; attribute isn’t visually shown.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  First option: the invisible label
&lt;/h3&gt;

&lt;p&gt;The first step is through adding an explicit &lt;code&gt;label&lt;/code&gt; for our search field:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;role=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"search-input"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"sr-only"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Find repositories..&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"search-input"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Find repositories.."&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If a placeholder is present with a label, make sure that the values match exactly. Yes, including the dots. Otherwise the screen reader — in this case Voice Over on MacOS — will announce the value of the &lt;code&gt;label&lt;/code&gt; followed by the value of the &lt;code&gt;placeholder&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We’re not done of course, since we now have a &lt;code&gt;label&lt;/code&gt; that’s still visible. And the requirement from the design (or from somewhere else) was quite clear. We shouldn’t have a visible &lt;code&gt;label&lt;/code&gt;. So the next step is to perform some CSS magic which will turn our &lt;code&gt;label&lt;/code&gt; invisible.&lt;/p&gt;

&lt;p&gt;You might have spotted the &lt;code&gt;sr-only&lt;/code&gt; class on the &lt;code&gt;label&lt;/code&gt;. The following snippet is the CSS magic that will turn our &lt;code&gt;label&lt;/code&gt; invisible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.sr-only&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="nl"&gt;clip&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;clip-path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;white-space&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;nowrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Credit for this CSS snippet goes to Scott O'Hara &lt;sup id="fnref2"&gt;2&lt;/sup&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Even though it’s visually not there, the &lt;code&gt;label&lt;/code&gt; still remains visible in the &lt;code&gt;Accessible tree&lt;/code&gt;&lt;sup id="fnref3"&gt;3&lt;/sup&gt; which is exactly what we need to make our search field accessible. &lt;/p&gt;

&lt;h3&gt;
  
  
  Second option: the other invisible label, aria-label
&lt;/h3&gt;

&lt;p&gt;If, for whatever reason, it’s not possible to add an explicit &lt;code&gt;label&lt;/code&gt; then we’ll turn to the second option. The &lt;code&gt;aria-label&lt;/code&gt; attribute. It has the same semantic meaning as the &lt;code&gt;label&lt;/code&gt;, so it’s doing a lot better than the &lt;code&gt;placeholder&lt;/code&gt; attribute. And this is because the &lt;code&gt;aria-label&lt;/code&gt; tries to act like the native &lt;code&gt;label&lt;/code&gt; element. Let’s add it to our search field.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;role=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Find repositories..."&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Find repositories.."&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because &lt;code&gt;aria-label&lt;/code&gt; is just an attribute and not a HTML element, we don’t need to do any CSS magic to turn it invisible. &lt;/p&gt;

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

&lt;p&gt;So this is it. We’ve explored two options to make our search field more accessible. The explicit &lt;code&gt;label&lt;/code&gt; and the &lt;code&gt;aria-label&lt;/code&gt; attribute. A short recap.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We shouldn’t use the &lt;code&gt;placeholder&lt;/code&gt; attribute as a substitute for a &lt;code&gt;label&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A label is required if we want to use Voice Control’s command &lt;strong&gt;“Click”&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;When a HTML element is visually not shown it doesn’t necessarily mean it’s gone from the Accessibility Tree&lt;/li&gt;
&lt;li&gt;Don’t forget to match the text from a &lt;code&gt;label&lt;/code&gt; with the &lt;code&gt;placeholder&lt;/code&gt;. Unless you want the screen reader to announce it twice!&lt;/li&gt;
&lt;li&gt;If it’s not possible to add an explicit &lt;code&gt;label&lt;/code&gt; we should use the &lt;code&gt;aria-label&lt;/code&gt; attribute&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Accessibility_tree"&gt;Read more - MDN on Accessibility tree&lt;/a&gt;&lt;/p&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;&lt;a href="https://webaim.org/projects/screenreadersurvey9/#primary"&gt;Read more - Screen reader usage share&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;&lt;a href="https://www.scottohara.me/blog/2017/04/14/inclusively-hidden.html"&gt;Read more - Visually hidden CSS snippet&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn3"&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>html</category>
      <category>a11y</category>
    </item>
    <item>
      <title>The what, why and how on labels</title>
      <dc:creator>Frank van Eldijk-Smeding</dc:creator>
      <pubDate>Wed, 09 Jun 2021 04:31:36 +0000</pubDate>
      <link>https://dev.to/beingfrankly/the-what-why-and-how-behind-labels-4ojc</link>
      <guid>https://dev.to/beingfrankly/the-what-why-and-how-behind-labels-4ojc</guid>
      <description>&lt;p&gt;Today I want to take the chance to tell you about the importance of labels and what they have to offer us. So with this bite-sized post I’ll cover the following: what a label is, what a label does if you use them, how we can use/add labels and which other HTML elements should have a label.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, what's a label to begin with?
&lt;/h2&gt;

&lt;p&gt;Well, the &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; is a simple HTML element that holds a text value&lt;sup id="fnref1"&gt;1&lt;/sup&gt;, which explains something about the related input element. And that's basically it for our humble label element. So how could such a simple HTML element have such an impact? Let's find out together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why should we use labels?
&lt;/h2&gt;

&lt;p&gt;Why we need to use labels, is to understand what they’ll do for us when we use them. So, what do we gain when we use a label? Well, when we’ve paired a label to an input field it does two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Increases the &lt;strong&gt;interactive area&lt;/strong&gt; of the associated input field. The browser does this for us when it sees a label paired with an input field. But what does it mean when the interactive area is increased? Well when the user clicks on the label it will instead focus on the associated input field. This improves the UX on mobile devices and for users with a physical disability (e.g. tremors).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Screen readers are able to announce the name (the associated label) of an input field when it's focused. See the examples down below what the difference is with and without an associated label.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Without label
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This will say: "edit text blank" - on MacBook Voice Over&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  With label
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"username_input"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Username:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"username_input"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This will say: "Username, edit text" - on MacBook Voice Over&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How could we add a label?
&lt;/h2&gt;

&lt;p&gt;There are two approaches for adding a label. The first approach is called &lt;strong&gt;implicit&lt;/strong&gt; and the second approach is called &lt;strong&gt;explicit&lt;/strong&gt;. We'll cover &lt;strong&gt;implicit&lt;/strong&gt; first and then I'll continue with &lt;strong&gt;explicit&lt;/strong&gt;. And I’ll explain why the second approach is the recommended option.&lt;/p&gt;

&lt;h3&gt;
  
  
  Implicit
&lt;/h3&gt;

&lt;p&gt;With the implicit method we use the label as a &lt;strong&gt;wrapper/container.&lt;/strong&gt; It doesn’t require anything else from us. Just put the input field inside and you’re done. You’ve added the label and associated it &lt;strong&gt;&lt;em&gt;implicitly&lt;/em&gt;&lt;/strong&gt; with an input field.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;label&amp;gt;&lt;/span&gt;
    Email:
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s move on to the second approach.&lt;/p&gt;

&lt;h3&gt;
  
  
  Explicit (recommended)
&lt;/h3&gt;

&lt;p&gt;With the explicit approach we don’t use the label as a wrapper/container. And we're not required to put it directly before the input field in the DOM* to make it work (which you’ll see in every example, even the one down below). So how could we tell HTML that the label we’re using is for specific input field? Through two special attributes: &lt;code&gt;for&lt;/code&gt; &amp;amp; &lt;code&gt;id&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"email_input"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Email:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"email_input"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The label element has a &lt;code&gt;for&lt;/code&gt; attribute that will have a certain value. The input element on their turn has an &lt;code&gt;id&lt;/code&gt; attribute which also holds a certain value. You may have guessed it, without peeking at the example above, that both attributes need to have the same value. By using the same value in the &lt;code&gt;for&lt;/code&gt; and the &lt;code&gt;id&lt;/code&gt; attribute you'll &lt;strong&gt;&lt;em&gt;explicitly&lt;/em&gt;&lt;/strong&gt; associate the label to an input field.&lt;/p&gt;

&lt;p&gt;So why is this the recommended approach? To put it simply, because of accessibility support&lt;sup id="fnref2"&gt;2&lt;/sup&gt;. At the moment it's not possible to select an input by its name (the associated label) through voice command (e.g. Voice Control from Apple). I've tested this myself on a MacBook with Safari and Voice Control. And it just didn't work, no matter how many times I've tried. I'll add a link down below for the current support results&lt;/p&gt;

&lt;p&gt;Now we know how to use and associate a label with an input. But are we limited to just an input or are there more potential friends for our label? There sure are and they're grouped together under "labelable" fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  Labelable, excuse me?
&lt;/h2&gt;

&lt;p&gt;As a non English speaker, that word is just a mouthful for me. Moving on. So this term groups a list of elements together that should be paired with a label&lt;sup id="fnref3"&gt;3&lt;/sup&gt;. I won't go into it further details what each element does on its own.&lt;/p&gt;

&lt;p&gt;Labelable fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;button&lt;/li&gt;
&lt;li&gt;inputs&lt;/li&gt;
&lt;li&gt;meter&lt;/li&gt;
&lt;li&gt;output&lt;/li&gt;
&lt;li&gt;progress&lt;/li&gt;
&lt;li&gt;select&lt;/li&gt;
&lt;li&gt;textarea&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The odd one in the list above is the &lt;code&gt;button&lt;/code&gt; element. Even though it's considered a labelable element it should &lt;strong&gt;not&lt;/strong&gt; be paired with a label. This is because the button already comes with a label, which is the text value inside the tags&lt;sup id="fnref4"&gt;4&lt;/sup&gt;. When using &lt;code&gt;&amp;lt;input type="button" value="Sign up"/&amp;gt;&lt;/code&gt; the label comes from it's &lt;code&gt;value&lt;/code&gt; attribute.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Credit goes to &lt;a href="https://dev.to/inhuofficial"&gt;InHuOfficial&lt;/a&gt; for pointing out that I've missed this in the original post.&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;ul&gt;
&lt;li&gt;When labels are used screen readers are able to do their work and assist their users&lt;/li&gt;
&lt;li&gt;Labels increase the interactive area for input fields which improves the user experience&lt;/li&gt;
&lt;li&gt;Using labels &lt;em&gt;explicitly&lt;/em&gt; is the recommended option when pairing up with a labelable element&lt;/li&gt;
&lt;li&gt;Labels used implicitly lack support for voice commands&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the next bite-sized blog we’re going to learn what to do when we can’t show a label visually. For whatever reason that might be.&lt;/p&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label"&gt;Read more - MDN Label documentation&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;&lt;a href="https://a11ysupport.io/tests/html_label_element_implicit#support-summary-by-at-sr"&gt;Read more  - Lacking support for &lt;strong&gt;implicit&lt;/strong&gt; labels&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn3"&gt;
&lt;p&gt;&lt;a href="https://html.spec.whatwg.org/multipage/forms.html#category-label"&gt;Read more - HTML labelable elements&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn4"&gt;
&lt;p&gt;&lt;a href="https://www.w3.org/WAI/tutorials/forms/labels/#labeling-buttons"&gt;Read more - Labeling buttons&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

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