{"id":342,"date":"2022-04-03T13:53:07","date_gmt":"2022-04-03T13:53:07","guid":{"rendered":"https:\/\/html5accessibility.com\/stuff\/?p=342"},"modified":"2024-06-10T16:50:36","modified_gmt":"2024-06-10T16:50:36","slug":"aria-labelledby-usage-notes","status":"publish","type":"post","link":"https:\/\/html5accessibility.com\/stuff\/2022\/04\/03\/aria-labelledby-usage-notes\/","title":{"rendered":"aria-labelledby usage notes"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-343\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2021\/02\/hats.png\" alt=\"Dave wearing a funny hat\" width=\"989\" height=\"253\" srcset=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2021\/02\/hats.png 989w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2021\/02\/hats-300x77.png 300w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2021\/02\/hats-768x196.png 768w\" sizes=\"auto, (max-width: 989px) 100vw, 989px\" \/><\/p>\n<p class=\"note\"><strong>Updated June 10th 2024<\/strong><\/p>\n<p>Like <code>aria-label<\/code>, <code>aria-labelledby<\/code> provides the opportunity for a developer to expose a <strong>short<\/strong> text string as the <a href=\"https:\/\/www.w3.org\/TR\/accname\/#dfn-accessible-name\">accessible name<\/a> for an element. The mechanism to do so differs. While <code>aria-label<\/code> accepts a <a href=\"https:\/\/w3c.github.io\/aria\/#valuetype_string\">string of text<\/a>, <code>aria-labelledby<\/code> accepts 1 or more <a href=\"https:\/\/w3c.github.io\/aria\/#valuetype_idref\"><code>id<\/code> values<\/a> (<strong>NOT<\/strong> a STRING OF TEXT).<\/p>\n<div>\n<p>The same opportunity is afforded by native HTML labelling features, <strong><em>please do use the native features wherever practical!<\/em><\/strong>, for example:<\/p>\n<ul>\n<li><code>&lt;label for=\"pithy\"&gt;<mark>poot<\/mark>&lt;\/label&gt; &lt;input type=\"text\" id=\"pithy\"&gt;<\/code><\/li>\n<li><code>&lt;img <mark>alt=\"creamy pie\"<\/mark>&gt;<\/code><\/li>\n<li><code>&lt;button&gt;<mark>belt on<\/mark>&lt;\/button&gt;<\/code><\/li>\n<\/ul>\n<\/div>\n<p><code>aria-labelledby<\/code> is one of a number of secondary methods to label native HTML UI elements. It works particularly well on interactive elements, it also works well on most block level elements <sup><em>old skool<\/em> term<\/sup> that have explicitly or implicitly defined structural roles. It works less well or <strong>not at all<\/strong> on <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#text-level-semantics\">text level semantics<\/a>. It is prohibited <em>as are<\/em> any form of accessible name on a <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">whole <strong>slew<\/strong> of roles<\/a>.<\/p>\n<p class=\"note\"><strong>Implicit roles<\/strong> are those <a href=\"https:\/\/w3c.github.io\/html-aam\/#html-element-role-mappings\">applied automatically by browsers<\/a> to native HTML elements.<\/p>\n<p class=\"note\"><strong>Explicit roles<\/strong> are those applied by developers using the <code>role<\/code> attribute. When applied they override the implicit role of an element.<\/p>\n<h2>(Somewhat out of place here) general rules for labeling<\/h2>\n<ol>\n<li>Prefer visible over hidden labels\n<ol>\n<li>Prefer text labels over icons<\/li>\n<li>If icons are used provide a supplementary text label ( may be displayed on focus\/hover)<\/li>\n<\/ol>\n<\/li>\n<li>Place visible labels as expected:\n<ol>\n<li>For a checkbox or radio button, place the label immediately after the field.<\/li>\n<li>If not a checkbox or radio button, place the label immediately before the field.<\/li>\n<\/ol>\n<\/li>\n<li>Prefer native HTML labeling mechanisms, for Native HTML controls, over ARIA labeling mechanisms.<\/li>\n<\/ol>\n<p class=\"note\"><strong>Never be tempted<\/strong> to use <a href=\"https:\/\/codepen.io\/stevef\/post\/placeholder-the-piss-take-label\">placeholder text as a label<\/a>. <strong>It SUX<\/strong>.<\/p>\n<h2>Questions on aria-labelledby usage<\/h2>\n<p>I find myself regularly asking the these questions in regards to <code>aria-label<\/code>:<\/p>\n<ol>\n<li>Is it a good idea to use <code>aria-labelledby<\/code> on element <em>X<\/em>?<\/li>\n<li>Does <code>aria-labelledby<\/code> work as expected <em>i.e<\/em> is announced by screen readers on element <em>Z?<\/em><\/li>\n<li>Is <code>aria-labelledby<\/code> allowed on element <em>Y<\/em>?<\/li>\n<\/ol>\n<p class=\"note\">FYI <em>empty<\/em> <code>aria-labelledby=\"\"<\/code> does not equal <em>empty<\/em> <code>alt=\"\"<\/code>, the latter signals that an <code>img<\/code> element has no useful information, the former does nothing.<\/p>\n<p class=\"note\"><code>aria-labelledby<\/code> masks any other accessible name source.<\/p>\n<h2><code>aria-labelledby<\/code> referencing content<\/h2>\n<h3>hidden content<\/h3>\n<p>It&#8217;s <em>legit <\/em>for <code>aria-labelledby<\/code> to reference a hidden element, it makes no difference to the resulting accessible name if the content is hidden (using CSS <code>display:none<\/code>, for example) Refer to <a href=\"https:\/\/w3c.github.io\/using-aria\/#hiding-content-has-no-effect-on-accessible-name-or-description-calculation\">Hiding Content Has No Effect on Accessible Name or Description Calculation<\/a><\/p>\n<pre>&lt;a href=\"beefy.html\" aria-labelledby=\"unseen\"&gt;\r\n<del>now you don't<\/del>&lt;\/a&gt;\r\n\r\n&lt;p id=\"unseen\" <mark>hidden<\/mark>&gt;Now you hear me&lt;\/p&gt;\r\n\r\naccessible name: \"Now you hear me\"<\/pre>\n<h3>self and multiple references<\/h3>\n<p>You can include text that would be exposed as the accessible name if <code>aria-labelledby<\/code> wasn&#8217;t there by adding an <code>id<\/code> to the element with the <code>aria-labelledby<\/code> and referencing the value, you can also reference multiple elements:<\/p>\n<pre>&lt;a href=\"noise.html\" id=\"heard\" \r\naria-labelledby=\"unseen heard\"&gt;\r\nnow you do&lt;\/a&gt;\r\n\r\n&lt;p id=\"unseen\" hidden&gt;Now you hear me,&lt;\/p&gt;\r\n\r\naccessible name: \"Now you hear me, now you do\"<\/pre>\n<p>The order in which you reference the <code>id<\/code> values effects the string concatenation order:<\/p>\n<pre>&lt;a href=\"alphabet.html\" id=\"pre\" \r\n<mark>aria-labelledby=\"pre a b c\"<\/mark>&gt;Easy as&lt;\/a&gt;\r\n\r\naccessible name: \"Easy as A B C\"\r\n\r\n&lt;a href=\"alphabet.html\" id=\"pre\" \r\n<mark>aria-labelledby=\"pre c b a\"<\/mark>&gt;Easy as&lt;\/a&gt;\r\n\r\naccessible name: \"Easy as C B A\"\r\n\r\n&lt;span id=\"a\"&gt;A&lt;\/span&gt; \r\n&lt;span id=\"b\"&gt;B&lt;\/span&gt;\r\n&lt;span id=\"c\"&gt;C&lt;\/span&gt;<\/pre>\n<h3 id=\"updated\">Spaces between strings <em>are<\/em> added by the browser<\/h3>\n<p>Today I learned that concatenated text <strong>does now<\/strong> have spaces by default, <em>mea culpa.<\/em><\/p>\n<blockquote><p>Append the <code>result<\/code> of each step above, <strong>with a space<\/strong>, to the <code>total accumulated text<\/code>.<\/p><\/blockquote>\n<p>source: <a href=\"https:\/\/w3c.github.io\/accname\/#computation-steps\">https:\/\/w3c.github.io\/accname\/#computation-steps<\/a><\/p>\n<p><del>Be aware that concatenated text does not have spaces by default, so you will need to include spaces.<\/del><\/p>\n<pre><del>&lt;a href=\"alphabet.html\" id=\"pre2\" \r\naria-labelledby=\"pre2 a b c\"&gt;Easy as&lt;\/a&gt;\r\n\r\naccessible name: \"Easy asABC\"\r\n\r\n&lt;a href=\"alphabet.html\" id=\"pre2\" \r\naria-labelledby=\"pre2 a b c\"&gt;Easy as<mark> <\/mark>&lt;\/a&gt;\r\n\r\naccessible name: \"Easy as<mark> <\/mark>ABC\"\r\n\r\n&lt;span id=\"a\"&gt;A&lt;\/span&gt; \r\n&lt;span id=\"b\"&gt;B&lt;\/span&gt;\r\n&lt;span id=\"c\"&gt;C&lt;\/span&gt;<\/del><\/pre>\n<p>Try it yourself &#8211; <a href=\"https:\/\/codepen.io\/stevef\/pen\/VwyrxQJ\">Codepen aria-labelledby examples<\/a><\/p>\n<p class=\"codepen\" style=\"height: 600px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\" data-height=\"600\" data-slug-hash=\"VwyrxQJ\" data-user=\"stevef\">See the Pen <a href=\"https:\/\/codepen.io\/stevef\/pen\/VwyrxQJ\"><br \/>\naria-labelledby examples<\/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>&nbsp;<\/p>\n<h2>humble guidance<\/h2>\n<p>For HTML elements I have provided some guidance on <code>aria-labelledby<\/code> usage (which by all means you may disagree with):<\/p>\n<p>&nbsp;<\/p>\n<table class=\"simple\">\n<caption>Could I use aria-labelledby?<\/caption>\n<tbody>\n<tr>\n<th>HTML element<\/th>\n<th>aria-labelledby<\/th>\n<th>notes<\/th>\n<\/tr>\n<\/tbody>\n<tbody>\n<tr id=\"el-a\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-a-element\"><code>a<\/code><\/a> with <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/links.html#attr-hyperlink-href\"><code>href<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Masks text content, so only <code>aria-labelledby<\/code> is announced:<\/p>\n<p><code>&lt;a href=\"home.html\" aria-labelledby=\"neon\"&gt;<del>uncle meat<\/del>&lt;\/a&gt;<\/code><\/p>\n<p><code>&lt;p id=\"neon\"&gt;some text&lt;\/p&gt;<\/code><\/p>\n<p>Be wary of <a href=\"https:\/\/www.w3.org\/TR\/WCAG21\/#label-in-name\">label in name<\/a> issues<\/td>\n<\/tr>\n<tr id=\"el-a-no-href\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-a-element\"><code>a<\/code><\/a> without <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/links.html#attr-hyperlink-href\"><code>href<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>a<\/code> without <code>href<\/code> is not a link and not exposed as a <code>link<\/code>. Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-abbr\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-abbr-element\"><code>abbr<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>title<\/code> attribute works but announcement is a user preference in some screen readers (off by default). Refer to <a href=\"https:\/\/developer.paciellogroup.com\/blog\/2019\/03\/short-note-the-abbreviation-appreciation-society\/\">Short note: The abbreviation appreciation society<\/a><\/td>\n<\/tr>\n<tr id=\"el-address\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/sections.html#the-address-element\"><code>address<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Does not mask content: accessible name provided via <code>aria-labelledby<\/code> should generally be announced when the <code>address<\/code> is navigated to.<\/p>\n<p><code>aria-labelledby<\/code> use not well supported as yet<\/td>\n<\/tr>\n<tr id=\"el-area\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/image-maps.html#the-area-element\"><code>area<\/code><\/a> with <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/links.html#attr-hyperlink-href\"><code>href<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>use <code>alt<\/code><\/td>\n<\/tr>\n<tr id=\"el-area-no-href\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/image-maps.html#the-area-element\"><code>area<\/code><\/a> without <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/links.html#attr-hyperlink-href\"><code>href<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>a<\/code> without <code>href<\/code> is not a link and not exposed as a <code>link<\/code>. Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-article\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/sections.html#the-article-element\"><code>article<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>article<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-aside\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/sections.html#the-aside-element\"><code>aside<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Does not mask content. Accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>aside<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-audio\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/media.html#audio\"><code>audio<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Prefer visible, a heading <em>perhaps<\/em> (via <code>aria-labelledby<\/code> if you like)<\/td>\n<\/tr>\n<tr id=\"el-b\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-b-element\"><code>b<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-base\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/semantics.html#the-base-element\"><code>base<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-bdi\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-bdi-element\"><code>bdi<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-bdo\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-bdo-element\"><code>bdo<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-blockquote\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-blockquote-element\"><code>blockquote<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-body\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/sections.html#the-body-element\"><code>body<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not supported<\/td>\n<\/tr>\n<tr id=\"el-br\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-br-element\"><code>br<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-button\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#the-button-element\"><code>button<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>masks text content, so only <code>aria-labelledby<\/code> is announced:<\/p>\n<p><code>&lt;button  aria-labelledby=\"neon\"&gt;<s>Herbert<\/s>&lt;\/button&gt;<\/code><\/p>\n<p><code>&lt;p id=\"neon\"&gt;Patrick H. Lauke&lt;\/p&gt;<\/code><\/p>\n<p>Be wary of <a href=\"https:\/\/www.w3.org\/TR\/WCAG21\/#label-in-name\">label in name<\/a> issues<\/td>\n<\/tr>\n<tr id=\"el-canvas\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/canvas.html#canvas\"><code>canvas<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Use child content<\/p>\n<p><code>&lt;canvas&gt;&lt;p&gt;&lt;a href=\"https:\/\/www.youtube.com\/watch?v=y8b7f0ivzUo\"&gt;Pictures of Lily&lt;\/a&gt;&lt;\/p&gt;&lt;\/canvas&gt;<\/code><\/td>\n<\/tr>\n<tr id=\"el-caption\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/tables.html#the-caption-element\"><code>caption<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-cite\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-cite-element\"><code>cite<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-code\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-code-element\"><code>code<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-col\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/tables.html#the-col-element\"><code>col<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-colgroup\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/tables.html#the-colgroup-element\"><code>colgroup<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-data\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-data-element\"><code>data<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-datalist\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#the-datalist-element\"><code>datalist<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>For <code>aria-labelledby<\/code> on <code>&lt;datalist&gt;<\/code> element itself.<\/td>\n<\/tr>\n<tr id=\"el-dd\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-dd-element\"><code>dd<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-del\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/edits.html#the-del-element\"><code>del<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-dfn\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-dfn-element\"><code>dfn<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-details\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/interactive-elements.html#the-details-element\"><code>details<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Does not mask content: When <code>details<\/code> has an accessible name it is announced as a group along with its accessible name (<a href=\"https:\/\/thepaciellogroup.github.io\/AT-browser-tests\/test-files\/details-summary.html#details10\">test case<\/a>).<\/td>\n<\/tr>\n<tr id=\"el-dialog\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/interactive-elements.html#the-dialog-element\"><code>dialog<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>dialog<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-div\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-div-element\"><code>div<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-dl\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-dl-element\"><code>dl<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Fairly good support across browsers\/screenreaders.<\/td>\n<\/tr>\n<tr id=\"el-dt\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-dt-element\"><code>dt<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-em\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-em-element\"><code>em<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-embed\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/iframe-embed-object.html#the-embed-element\"><code>embed<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-fieldset\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#the-fieldset-element\"><code>fieldset<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td><code>aria-labelledby<\/code> overrides accessible name from <code>legend<\/code> content (if present). Otherwise, does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>fieldset<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-figcaption\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-figcaption-element\"><code>figcaption<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-figure\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-figure-element\"><code>figure<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td><code>aria-labelledby<\/code> overrides accessible name from <code>figcaption<\/code> content (if present). Otherwise, does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>figure<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-footer\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/sections.html#the-footer-element\"><code>footer<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>footer<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-form\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/forms.html#the-form-element\"><code>form<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>form<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-form-associated-custom-element\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/custom-elements.html#form-associated-custom-element\">form-associated custom element<\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Unless the custom element is an extension of a native HTML interactive element, ARIA labeling (<code>aria-label<\/code>, <code>aria-labelledby<\/code>) is the primary method of labeling.<\/td>\n<\/tr>\n<tr id=\"el-h1-h6\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements\"><code>h1 to h6<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported, works with NVDA\/VoiceOver not with JAWS<\/p>\n<p>Masks text content, so only <code>aria-labelledby<\/code> is announced:<\/p>\n<p><code>&lt;h1  aria-labelledby=\"pang\"&gt;<s>PONG<\/s>&lt;\/h1&gt;<\/code><\/p>\n<p><code>&lt;p id=\"pang\"&gt;PING&lt;\/p&gt;<\/code><\/td>\n<\/tr>\n<tr id=\"el-head\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/semantics.html#the-head-element\"><code>head<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-header\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/sections.html#the-header-element\"><code>header<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>header<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-hgroup\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/sections.html#the-hgroup-element\"><code>hgroup<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>hgroup<\/code> is navigated to.<\/p>\n<p><code>aria-labelledby<\/code> use not well supported as yet.<\/td>\n<\/tr>\n<tr id=\"el-hr\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-hr-element\"><code>hr<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Will generally be announced when the <code>hr<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-html\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/semantics.html#the-html-element\"><code>html<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-i\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-i-element\"><code>i<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-iframe\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/iframe-embed-object.html#the-iframe-element\"><code>iframe<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Use <code>title<\/code> attribute for accessible name<\/td>\n<\/tr>\n<tr id=\"el-img\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/embedded-content.html#the-img-element\"><code>img<\/code><\/a> with <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/embedded-content.html#attr-img-alt\"><code>alt<\/code><\/a><code>=\"some text\"<\/code><\/td>\n<td class=\"no\">no<\/td>\n<td>Use <code>alt<\/code> attribute for accessible name<\/td>\n<\/tr>\n<tr id=\"el-img-empty-alt\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/embedded-content.html#the-img-element\"><code>img<\/code><\/a> with <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/embedded-content.html#attr-img-alt\"><code>alt<\/code><\/a><code>=\"\"<\/code><\/td>\n<td class=\"no\">no<\/td>\n<td>use <code>alt<\/code><\/td>\n<\/tr>\n<tr id=\"el-img-no-alt\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/embedded-content.html#the-img-element\"><code>img<\/code><\/a> without <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/images.html#unknown-images\"><code>alt<\/code><\/a> attribute<\/td>\n<td class=\"no\">no<\/td>\n<td>if you want to add an accessible name to an <code>&lt;img&gt;<\/code> use <code>alt<\/code> attribute for accessible name<\/td>\n<\/tr>\n<tr id=\"el-input-button\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#button-state-(type=button)\"><code>input type=button<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>value<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-checkbox\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#checkbox-state-(type=checkbox)\"><code>input type=checkbox<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-color\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#color-state-(type=color)\"><code>input type=color<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-date\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#date-state-(type=date)\"><code>input type=date<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-datetime-local\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#local-date-and-time-state-(type=datetime-local)\"><code>input type=datetime-local<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-email\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#e-mail-state-(type=email)\"><code>input type=email<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-file\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#file-upload-state-(type=file)\"><code>input type=file<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-hidden\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#hidden-state-(type=hidden)\"><code>input type=hidden<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-input-image\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#image-button-state-(type=image)\"><code>input type=image<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>if you want to add an accessible name to an <code>&lt;input type=image&gt;<\/code> use <code>alt<\/code><\/td>\n<\/tr>\n<tr id=\"el-input-month\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#month-state-(type=month)\"><code>input type=month<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-number\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#number-state-(type=number)\"><code>input type=number<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-password\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#password-state-(type=password)\"><code>input type=password<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-radio\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#radio-button-state-(type=radio)\"><code>input type=radio<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-range\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#range-state-(type=range)\"><code>input type=range<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>value<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-reset\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#reset-button-state-(type=reset)\"><code>input type=reset<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>value<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-search\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#text-(type=text)-state-and-search-state-(type=search)\"><code>input type=search<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-submit\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#submit-button-state-(type=submit)\"><code>input type=submit<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>value<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-tel\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#telephone-state-(type=tel)\"><code>input type=tel<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-text\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#text-(type=text)-state-and-search-state-(type=search)\"><code>input type=text<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-time\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#time-state-(type=time)\"><code>input type=time<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-url\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#url-state-(type=url)\"><code>input type=url<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-input-week\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/input.html#week-state-(type=week)\"><code>input type=week<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-ins\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/edits.html#the-ins-element\"><code>ins<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-kbd\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-kbd-element\"><code>kbd<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-label\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/forms.html#the-label-element\"><code>label<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed (until ARIA 1.3)<\/td>\n<\/tr>\n<tr id=\"el-legend\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#the-legend-element\"><code>legend<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-li\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-li-element\"><code>li<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-link\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/semantics.html#the-link-element\"><code>link<\/code><\/a> element with a<br \/>\n<a href=\"https:\/\/html.spec.whatwg.org\/multipage\/semantics.html#attr-link-href\"><code>href<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Don&#8217;t use <code>link<\/code> in <code>body<\/code><\/td>\n<\/tr>\n<tr id=\"el-main\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-main-element\"><code>main<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>main<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-map\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/image-maps.html#the-map-element\"><code>map<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-math\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/embedded-content-other.html#mathml\"><code>math<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>The <code>math<\/code> element is not currently supported in modern browsers.<\/td>\n<\/tr>\n<tr id=\"el-mark\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-mark-element\"><code>mark<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-menu\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#menus\"><code>menu<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>This element <em>sucks<\/em> in general, suggest not using.<\/td>\n<\/tr>\n<tr id=\"el-meta\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/semantics.html#meta\"><code>meta<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-meter\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#the-meter-element\"><code>meter<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-nav\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/sections.html#the-nav-element\"><code>nav<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>nav<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-noscript\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/scripting.html#the-noscript-element\"><code>noscript<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-object\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/iframe-embed-object.html#the-object-element\"><code>object<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-ol\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-ol-element\"><code>ol<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Fairly good support across browsers\/screenreaders.<\/td>\n<\/tr>\n<tr id=\"el-optgroup\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#the-optgroup-element\"><code>optgroup<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Use <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#attr-optgroup-label\"><code>label<\/code><\/a> attribute<\/td>\n<\/tr>\n<tr id=\"el-option\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#the-option-element\"><code>option<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Use text content of <code>option<\/code> or use a <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#attr-option-label\"><code>label<\/code><\/a> attribute.<\/td>\n<\/tr>\n<tr id=\"el-output\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#the-output-element\"><code>output<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not supported<\/td>\n<\/tr>\n<tr id=\"el-p\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-p-element\"><code>p<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-param\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/iframe-embed-object.html#the-param-element\"><code>param<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-picture\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/embedded-content.html#the-picture-element\"><code>picture<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-pre\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-pre-element\"><code>pre<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-progress\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#the-progress-element\"><code>progress<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred or a heading <em>perhaps<\/em> (via <code>aria-labelledby<\/code> if you like).<\/td>\n<\/tr>\n<tr id=\"el-q\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-q-element\"><code>q<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-rp\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-rp-element\"><code>rp<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-rt\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-rt-element\"><code>rt<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-ruby\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-ruby-element\"><code>ruby<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-s\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-s-element\"><code>s<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-samp\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-samp-element\"><code>samp<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-script\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/scripting.html#script\"><code>script<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-search\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-search-element\"><code>search<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>search<\/code> element is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-section\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/sections.html#the-section-element\"><code>section<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Does not mask content: accessible name provided via <code>aria-labelledby<\/code> will generally be announced when the <code>section<\/code> is navigated to.<\/td>\n<\/tr>\n<tr id=\"el-select\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#the-select-element\"><code>select<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-slot\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/scripting.html#the-slot-element\"><code>slot<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-small\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-small-element\"><code>small<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-source\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/embedded-content.html#the-source-element\"><code>source<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-span\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-span-element\"><code>span<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-strong\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-strong-element\"><code>strong<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-style\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/semantics.html#the-style-element\"><code>style<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-svg\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/embedded-content-other.html#svg-0\"><code>SVG<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td><code>alt=\"some text\"<\/code> <strong>DOES NOT WORK<\/strong> even if the <code>SVG<\/code> (or any other element) has a <code>role=\"img\"<\/code><\/td>\n<\/tr>\n<tr id=\"el-sub\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-sub-element\"><code>sub<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-summary\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/interactive-elements.html#the-summary-element\"><code>summary<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-sup\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-sup-element\"><code>sup<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>refer to <a href=\"https:\/\/w3c.github.io\/aria\/#namefromprohibited\">Roles which cannot be named (Name prohibited)<\/a> ARIA 1.2<\/td>\n<\/tr>\n<tr id=\"el-table\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/tables.html#the-table-element\"><code>table<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Prefer visible <code>caption<\/code> element text<\/td>\n<\/tr>\n<tr id=\"el-tbody\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/tables.html#the-tbody-element\"><code>tbody<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-template\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/scripting.html#the-template-element\"><code>template<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-textarea\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/form-elements.html#the-textarea-element\"><code>textarea<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>accessible name from <code>label<\/code> preferred<\/td>\n<\/tr>\n<tr id=\"el-tfoot\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/tables.html#the-tfoot-element\"><code>tfoot<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-thead\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/tables.html#the-thead-element\"><code>thead<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-time\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-time-element\"><code>time<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-title\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/semantics.html#the-title-element\"><code>title<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not supported<\/td>\n<\/tr>\n<tr id=\"el-td\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/tables.html#the-td-element\"><code>td<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-th\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/tables.html#the-th-element\"><code>th<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-tr\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/tables.html#the-tr-element\"><code>tr<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td><code>aria-labelledby<\/code> use not well supported<\/td>\n<\/tr>\n<tr id=\"el-track\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/media.html#the-track-element\"><code>track<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>not UI<\/td>\n<\/tr>\n<tr id=\"el-u\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-u-element\"><code>u<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-ul\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/grouping-content.html#the-ul-element\"><code>ul<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Fairly good support across browsers\/screenreaders.<\/td>\n<\/tr>\n<tr id=\"el-var\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-var-element\"><code>var<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<tr id=\"el-video\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/media.html#video\"><code>video<\/code><\/a><\/td>\n<td class=\"yes\">yes<\/td>\n<td>Prefer visible, a heading <em>perhaps<\/em> (via <code>aria-labelledby<\/code> if you like)<\/td>\n<\/tr>\n<tr id=\"el-wbr\" tabindex=\"-1\">\n<td><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-wbr-element\"><code>wbr<\/code><\/a><\/td>\n<td class=\"no\">no<\/td>\n<td>Maps to <a href=\"https:\/\/w3c.github.io\/aria\/#generic\"><code>role=generic<\/code><\/a> naming not allowed<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Further reading<\/h2>\n<ul>\n<li><a href=\"https:\/\/html5accessibility.com\/stuff\/2020\/11\/07\/not-so-short-note-on-aria-label-usage-big-table-edition\/\">Not so short note on aria-label usage \u2013 Big Table Edition<\/a><\/li>\n<li><a href=\"https:\/\/html5accessibility.com\/stuff\/2022\/01\/10\/alt-tag-emptiness\/\">ALT TAG EMPTINESS<\/a><\/li>\n<\/ul>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/t5wooTRxHM0\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Updated June 10th 2024 Like aria-label, aria-labelledby provides the opportunity for a developer to expose a short text string as the accessible name for an element. The mechanism to do so differs. While aria-label accepts a string of text, aria-labelledby accepts 1 or more id values (NOT a STRING OF TEXT). The same opportunity is [&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-342","post","type-post","status-publish","format-standard","hentry","category-htmlaccessibility"],"_links":{"self":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/342","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=342"}],"version-history":[{"count":31,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/342\/revisions"}],"predecessor-version":[{"id":1153,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/342\/revisions\/1153"}],"wp:attachment":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/media?parent=342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/categories?post=342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/tags?post=342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}