{"id":300,"date":"2021-02-09T09:57:20","date_gmt":"2021-02-09T09:57:20","guid":{"rendered":"https:\/\/html5accessibility.com\/stuff\/?p=300"},"modified":"2021-02-09T10:31:08","modified_gmt":"2021-02-09T10:31:08","slug":"aria-description-by-public-demand-and-to-thunderous-applause","status":"publish","type":"post","link":"https:\/\/html5accessibility.com\/stuff\/2021\/02\/09\/aria-description-by-public-demand-and-to-thunderous-applause\/","title":{"rendered":"aria-description: By Public Demand and to Thunderous Applause"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-313 size-full\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2021\/02\/popula2r-1.jpg\" alt=\"upper torsos and heads of malevolent looking dolls, against a flowery wallpaper background.\" width=\"746\" height=\"298\" srcset=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2021\/02\/popula2r-1.jpg 746w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2021\/02\/popula2r-1-300x120.jpg 300w\" sizes=\"auto, (max-width: 746px) 100vw, 746px\" \/><\/p>\n<p><a href=\"https:\/\/w3c.github.io\/aria\/#aria-description\"><code>aria-description<\/code><\/a> is the ARIA attribute <em>you wanted<\/em>, it makes adding a description (<em>for screen reader users ONLY<\/em>) <strong>so much simpler<\/strong>.<\/p>\n<blockquote><p>The <a class=\"property-reference\" href=\"https:\/\/w3c.github.io\/aria\/#aria-description\"><code>aria-description<\/code><\/a> attribute is similar to <a class=\"property-reference\" href=\"https:\/\/w3c.github.io\/aria\/#aria-label\"><code>aria-label<\/code><\/a> in that both provide a flat string to associate with the element, but a label should be concise, whereas a description is intended to provide more verbose information.<\/p>\n<p>source: <a href=\"https:\/\/w3c.github.io\/aria\/#aria-description\">ARIA 1.2<\/a><\/p><\/blockquote>\n<h2>Vibes<\/h2>\n<p>The <strong>good vibes<\/strong> about <code>aria-description<\/code> is that once implemented in the browser it will automatically have the same level of support as <code>aria-describedby<\/code> as they are both the source of text for the <a href=\"https:\/\/w3c.github.io\/html-aam\/#dfn-accessible-description\">accessible description<\/a> property in <a href=\"https:\/\/w3c.github.io\/html-aam\/#intro_aapi\">accessibility APIs<\/a> In fact it&#8217;s already implemented in Firefox\/Chrome\/Edge on Windows (and <a href=\"https:\/\/twitter.com\/MarcoInEnglish\/status\/1359081770168254467?s=20\">other platforms too with Firefox<\/a>) and is announced by screen readers, you can try it for yourself:<\/p>\n<p class=\"codepen\" style=\"height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\" data-height=\"300\" data-theme-id=\"5390\" data-default-tab=\"html,result\" data-user=\"stevef\" data-slug-hash=\"BaQzNeG\" data-pen-title=\"aria-description tests\">See the Pen <a href=\"https:\/\/codepen.io\/stevef\/pen\/BaQzNeG\"><br \/>\naria-description tests<\/a> by steve faulkner (<a href=\"https:\/\/codepen.io\/stevef\">@stevef<\/a>)<br \/>\non <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p><script async src=\"https:\/\/cpwebassets.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<p>The <strong>bad vibes <\/strong>the <a href=\"https:\/\/w3c.github.io\/html-aam\/#dfn-accessible-description\">accessible description<\/a> content is, currently, only announced\u00a0 on a subset of roles\/elements; such as interactive elements. So do not <em>ass-u-me<\/em> that your <code>aria-description\/aria-describedby<\/code> will be announced on a <code>&lt;span&gt;<\/code> for example.<\/p>\n<h2>ALL Times<\/h2>\n<p class=\"note\">Think really REALLY carefully about whether <strong>screen reader only<\/strong> content of any type is <em>really<\/em> <strong>REALLY<\/strong> needed. Ask yourself could the content I am going to hide away from many people actually be useful to them?? Of course there are contexts where content for assistive technology users is both appropriate and essential to understanding:<\/p>\n<p><code>&lt;img alt=\"Neon Meat Dream of an Octofish\"&gt;<\/code> comes to mind<\/p>\n<h2>Now<\/h2>\n<p>To provide <strong>a screen reader only<\/strong> description an element with the text needs to be added, associated with the element using <a href=\"https:\/\/w3c.github.io\/aria\/#aria-describedby\"><code>aria-describedby<\/code><\/a> and then hidden:<\/p>\n<pre>&lt;a href=\"help.html\" \r\n<mark>aria-describedby=\"help1\"<\/mark>&gt;HELP&lt;\/a&gt;\r\n\r\n<mark>&lt;div hidden id=\"help1\"&gt;\r\nWe can help you with a range of problems&lt;\/div&gt;<\/mark><\/pre>\n<h2>Future<\/h2>\n<p>To provide <strong>a screen reader only<\/strong> description for an element add it directly to the element:<\/p>\n<pre>&lt;a href=\"help.html\" \r\n<mark>aria-description=\"We can help you with a \r\nrange of problems\"<\/mark>&gt;\r\nHELP&lt;\/a&gt;<\/pre>\n<h2>Be Pithy<\/h2>\n<blockquote class=\"twitter-tweet\">\n<p dir=\"ltr\" lang=\"en\"><a href=\"https:\/\/twitter.com\/hashtag\/ARIA?src=hash&amp;ref_src=twsrc%5Etfw\">#ARIA<\/a> be pithy ??<br \/>\naria-label: a word or phrase is better than a sentence<br \/>\naria-describedby: a sentence is better than a paragraph<a href=\"https:\/\/twitter.com\/hashtag\/a11y?src=hash&amp;ref_src=twsrc%5Etfw\">#a11y<\/a><\/p>\n<p>\u2014 Steve Faulkner (@stevefaulkner) <a href=\"https:\/\/twitter.com\/stevefaulkner\/status\/1358698482391990272?ref_src=twsrc%5Etfw\">February 8, 2021<\/a><\/p><\/blockquote>\n<h2>Further reading<\/h2>\n<ul>\n<li><a href=\"https:\/\/docs.google.com\/document\/d\/1DYrsHDk6Y9071A1fRg8g8NZ_DtGYraX5BcVY-taBzMQ\/edit#heading=h.3ouywf2zdx7\">Annotations for screen readers<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/w3c\/aria\/issues\/1397\">Why is aria-description a global attribute without any prohibitions?<\/a><\/li>\n<\/ul>\n<h2>Pump it Up<\/h2>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/3Y71iDvCYXA\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>aria-description is the ARIA attribute you wanted, it makes adding a description (for screen reader users ONLY) so much simpler. The aria-description attribute is similar to aria-label in that both provide a flat string to associate with the element, but a label should be concise, whereas a description is intended to provide more verbose information. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-300","post","type-post","status-publish","format-standard","hentry","category-htmlaccessibility"],"_links":{"self":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/comments?post=300"}],"version-history":[{"count":25,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/300\/revisions"}],"predecessor-version":[{"id":328,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/300\/revisions\/328"}],"wp:attachment":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/media?parent=300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/categories?post=300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/tags?post=300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}