{"id":137,"date":"2020-10-06T13:28:50","date_gmt":"2020-10-06T13:28:50","guid":{"rendered":"https:\/\/html5accessibility.com\/stuff\/?p=137"},"modified":"2020-10-06T21:22:55","modified_gmt":"2020-10-06T21:22:55","slug":"micro-note-on-aria-roledescription","status":"publish","type":"post","link":"https:\/\/html5accessibility.com\/stuff\/2020\/10\/06\/micro-note-on-aria-roledescription\/","title":{"rendered":"Micro-note on aria-roledescription"},"content":{"rendered":"<h1><code>aria-roledescription<\/code> is not a label<\/h1>\n<p>It is an alternative expression of the <a href=\"https:\/\/developer.paciellogroup.com\/blog\/2015\/10\/thus-spoke-html\/\">Aural UI<\/a> of the <a href=\"https:\/\/www.w3.org\/TR\/wai-aria\/#dfn-role\">role<\/a> of an element.<\/p>\n<blockquote><p><strong>inappropriately using <code><a class=\"property-reference\" href=\"https:\/\/www.w3.org\/TR\/wai-aria\/#aria-roledescription\">aria-roledescription<\/a><\/code> may inhibit users&#8217; ability to understand or interact with an element.<\/strong><br \/>\n<cite><a href=\"https:\/\/www.w3.org\/TR\/wai-aria\/#aria-roledescription\">ARIA 1.1<\/a><\/cite><\/p><\/blockquote>\n<h2>The wrong way to use <code>aria-roledescription<\/code> <em>and<\/em> call out someone as a fascist:<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/assets.codepen.io\/128034\/dt.PNG\" alt=\"donald trump\" aria-roledescription=\"fascist\" \/><\/p>\n<h3>code<\/h3>\n<pre><code>\r\n&lt;img aria-roledescription=\"fascist\" src=\"dt.PNG\" \r\nalt=\"Donald Trump\"&gt;<\/code><\/pre>\n<p>This is wrong because you are not identifying the subject of the image as a <em>fascist<\/em>, you are overwriting the <code>&lt;img&gt;<\/code> element role so it effectively becomes a <code>&lt;fascist&gt;<\/code> element. Also, there is no explicit text identification of the subject as a fascist.<\/p>\n<h2>A much better way to achieve the aim of identifying a fascist (and not misusing <code>aria-roledescription<\/code>):<\/h2>\n<figure><figcaption>Example of a fascist<\/figcaption><img decoding=\"async\" src=\"https:\/\/assets.codepen.io\/128034\/dt.PNG\" alt=\"donald trump\" \/><\/figure>\n<h2>code<\/h2>\n<pre><code>&lt;figure&gt;\r\n&lt;figcaption&gt;Example of a fascist&lt;\/figcaption&gt;\r\n&lt;img src=\"dt.PNG\" alt=\"Donald Trump\"&gt;\r\n&lt;\/figure&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>aria-roledescription is not a label It is an alternative expression of the Aural UI of the role of an element. inappropriately using aria-roledescription may inhibit users&#8217; ability to understand or interact with an element. ARIA 1.1 The wrong way to use aria-roledescription and call out someone as a fascist: code &lt;img aria-roledescription=&#8221;fascist&#8221; src=&#8221;dt.PNG&#8221; alt=&#8221;Donald Trump&#8221;&gt; [&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-137","post","type-post","status-publish","format-standard","hentry","category-htmlaccessibility"],"_links":{"self":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/137","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=137"}],"version-history":[{"count":15,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":154,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/137\/revisions\/154"}],"wp:attachment":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}