{"id":703,"date":"2022-02-28T10:09:58","date_gmt":"2022-02-28T10:09:58","guid":{"rendered":"https:\/\/html5accessibility.com\/stuff\/?p=703"},"modified":"2022-02-28T10:09:58","modified_gmt":"2022-02-28T10:09:58","slug":"not-so-short-note-on-being-owned","status":"publish","type":"post","link":"https:\/\/html5accessibility.com\/stuff\/2022\/02\/28\/not-so-short-note-on-being-owned\/","title":{"rendered":"(not so) short note on being owned"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-704 size-full\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/IMG_8596-1.jpg\" alt=\"Patrick the 'muscle' Lauke\" width=\"345\" height=\"492\" srcset=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/IMG_8596-1.jpg 345w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/IMG_8596-1-210x300.jpg 210w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/p>\n<h2><code>aria-owns<\/code> is surprisingly strong magic<\/h2>\n<p><code>aria-owns<\/code> allows developers to restructure the parent-child relationships in the accessibility tree. This means that screen reader users may experience a different semantic structure and meaning to other users when they navigate and interact with content using their screen readers <a href=\"https:\/\/tink.uk\/understanding-screen-reader-interaction-modes\/\">virtual\/browse mode<\/a>.<\/p>\n<p class=\"note\"><a href=\"https:\/\/w3c.github.io\/core-aam\/#glossary\"><strong>Accessibility Tree<\/strong><\/a><\/p>\n<blockquote><p>Tree of <a href=\"https:\/\/www.w3.org\/TR\/wai-aria\/#dfn-accessible-object\">accessible objects<\/a> that represents the structure of the user interface (<abbr title=\"user interface\">UI<\/abbr>). Each node in the accessibility tree represents an element in the <abbr title=\"user interface\">UI<\/abbr> as exposed through the <a href=\"https:\/\/www.w3.org\/TR\/wai-aria\/#dfn-accessibility-api\">accessibility <abbr title=\"Application Programming Interface\">API<\/abbr><\/a>; for example, a push button, a check box, or container.<\/p><\/blockquote>\n<h3>Simple example<\/h3>\n<p>Using <code>aria-owns<\/code> to change meaning by swapping the order of words.<\/p>\n<h4>In the DOM: Ass Backwards<\/h4>\n<pre>&lt;p aria-owns=\"back ass\"&gt;\r\n&lt;span id=\"ass\"&gt;Ass&lt;\/span&gt; \r\n&lt;span id=\"back\"&gt;Backwards&lt;\/span&gt;\r\n&lt;\/p&gt;\r\n<\/pre>\n<h4>In the Accessibility tree: Backwards Ass<\/h4>\n<pre>paragraph:Backwards Ass\r\n<\/pre>\n<p>Some users get <em>Ass Backwards <\/em>and others get <strong>Backwards Ass<\/strong><\/p>\n<h4>Try it for yourself<\/h4>\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-slug-hash=\"ExbdVEK\" data-user=\"stevef\">See the Pen <a href=\"https:\/\/codepen.io\/stevef\/pen\/ExbdVEK\"><br \/>\nUntitled<\/a> by steve faulkner (<a href=\"https:\/\/codepen.io\/stevef\">@stevef<\/a>)<br \/>\non <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<h3>own and owner<\/h3>\n<p>When you start doing more complex things with <code>aria-owns<\/code>, things start getting <em>hairy<\/em>. You may well have to add additional ARIA <code>role<\/code> attributes to your base HTML to ensure robust structure.<\/p>\n<h4>In the DOM: 3 single row tables<\/h4>\n<p><strong>Table 1<\/strong> has the caption and column headers and <code>aria-owns<\/code> referencing the <code>id<\/code>&#8216;s of the rows in tables 1, 2 and 3<\/p>\n<pre>&lt;table aria-owns=\"r1 r2 r3\"&gt;\r\n&lt;caption&gt;Prices for lemons \r\nand pears in London&lt;\/caption&gt;\r\n&lt;tr id=\"r1\"&gt;\r\n&lt;td&gt;&lt;\/td&gt;\r\n&lt;th&gt;Lemons&lt;\/th&gt;\r\n&lt;th&gt;Pears&lt;\/th&gt;\r\n&lt;\/tr&gt;\r\n&lt;\/table&gt;<\/pre>\n<p><strong>Table 2<\/strong> has a row with a row header and 2 data cells. Each has an explicit role<\/p>\n<pre> &lt;table&gt;\r\n&lt;tr id=\"r2\" role=\"row\"&gt;\r\n&lt;th role=\"rowheader\"&gt;Wholesale&lt;\/th&gt;\r\n&lt;td role=\"cell\"&gt;\u00a31.00&lt;\/td&gt;\r\n&lt;td role=\"cell\"&gt;\u00a31.50&lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n&lt;\/table&gt;<\/pre>\n<p><strong>Table 3<\/strong> has a row with a row header and 2 data cells. The roles are not explicitly identified, as their implicit roles identify them.<\/p>\n<pre> &lt;table&gt;\r\n&lt;tr id=\"r3\"&gt;\r\n&lt;th&gt;Retail&lt;\/th&gt;\r\n&lt;td&gt;\u00a32.00&lt;\/td&gt;\r\n&lt;td&gt;\u00a32.50&lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n&lt;\/table&gt;<\/pre>\n<h4>In the Accessibility tree: One, 3 row table, in Chrome <em>at least<\/em><\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-716 size-full\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/chrometree.png\" alt=\"the roles and content of the 3 separate tables are rolled up into one table with all the semantics preserved.\" width=\"378\" height=\"278\" srcset=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/chrometree.png 378w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/chrometree-300x221.png 300w\" sizes=\"auto, (max-width: 378px) 100vw, 378px\" \/><\/p>\n<h4>In the Firefox Accessibility tree: One, 2 row table, with text containers where the 3rd row should be<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-715 size-full\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/firefoxtree.png\" alt=\"In Firefox the row without the explicit roles declared has lost it semantics.\" width=\"829\" height=\"378\" srcset=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/firefoxtree.png 829w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/firefoxtree-300x137.png 300w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/firefoxtree-768x350.png 768w\" sizes=\"auto, (max-width: 829px) 100vw, 829px\" \/><\/p>\n<h4>Try it for yourself<\/h4>\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-slug-hash=\"dyZReza\" data-user=\"stevef\">See the Pen <a href=\"https:\/\/codepen.io\/stevef\/pen\/dyZReza\"><br \/>\ntables owned<\/a> by steve faulkner (<a href=\"https:\/\/codepen.io\/stevef\">@stevef<\/a>)<br \/>\non <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<h3>Focus on things falling apart<\/h3>\n<p>When focusable elements are manipulated using <code>aria-owns<\/code> the going gets weird.<\/p>\n<h4>Virtual focus<\/h4>\n<p>Virtual focus order adheres to the accessibility tree representation, the links are in reverse order to the DOM.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-724 size-full\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/linklist.png\" alt=\"NVDA link list reflects the link order in the accessibility tree. HTML Accessibility API Mapping first item, 2nd item ARIA in HTML.\" width=\"327\" height=\"176\" srcset=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/linklist.png 327w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/linklist-300x161.png 300w\" sizes=\"auto, (max-width: 327px) 100vw, 327px\" \/><\/p>\n<h4>TAB focus order becomes corrupted<\/h4>\n<p>Using the <a href=\"https:\/\/codepen.io\/stevef\/pen\/YzEJxpv\">links test case<\/a> with a screen reader:<\/p>\n<ol>\n<li>Start with virtual focus on the heading.<\/li>\n<li>Press the TAB key once, focus moves to the second link (expected)<\/li>\n<li>Press the TAB key again, focus moves out of the page to the browser chrome control. The first link is not included in the TAB focus order.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-725 size-full\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/focus.png\" alt=\"Annotated screenshot showing the focus movement skipping the first link.\" width=\"610\" height=\"393\" srcset=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/focus.png 610w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2022\/02\/focus-300x193.png 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<h4>Try it for yourself<\/h4>\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-slug-hash=\"YzEJxpv\" data-user=\"stevef\">See the Pen <a href=\"https:\/\/codepen.io\/stevef\/pen\/YzEJxpv\"><br \/>\nUntitled<\/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<h3>Did I mention Webkit?<\/h3>\n<p><code>aria-owns<\/code> does not appear to be supported in Webkit based browsers. So on Mac\/VO\/Safari doesn&#8217;t work at all. On <strong>any browser<\/strong> on iOS (since they are all Webkit under the hood) doesn&#8217;t work at all.<\/p>\n<h3>Don&#8217;t let things fall apart<\/h3>\n<p>Avoid using <code>aria-owns<\/code>, unless you really have to, <a href=\"https:\/\/w3c.github.io\/using-aria\/#rule1\">HTML first<\/a>. If you do, ensure you test it thoroughly with users. Keep in mind its platform dependent support and it&#8217;s funky user experience outcomes.<\/p>\n<p><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/GWUTZpRt_uk\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<details>\n<summary>Lyrics &#8211; Motorola &#8211; DaBeatfreakz x Deno x Swarmz x Dappy<\/summary>\n<pre>This is the, this is the 9 side\r\nBeatfreakz!\r\nMotorola, bros on the road now\r\nThe paigons running\r\nBetter go down, making us slow now\r\nTake no warning\r\nMy mandem mad, don't be sad\r\nI'm on a motorola\r\nMy mandem can, don't be sad\r\nWe taking over\r\nChitty-chitty, bang-bang\r\nI said chitty-chitty, bang-bang\r\nWho's that knocking on my door?\r\nChitty-chitty, bang-bang\r\nI said chitty-chitty, bang-bang\r\nEveryone's ducking on the floor\r\nRing ring, pick up Motorola\r\nAnd if I rolling with the suttin', let it all out\r\nSee if I pull up with my niners lock your door now\r\nPick up the money, 20 minutes and it's over\r\nMotorola, bros on the road now\r\nThe paigons running\r\nBetter go down, making us slow now\r\nTake no warning\r\nMy mandem mad, don't be sad\r\nI'm on a motorola\r\nMy mandem can, don't be sad\r\nWe taking over\r\nThey think that they bad, but we're sick of it\r\nWe see them live o, but they innocent\r\nGot the ginger, saw me give to them\r\nSaw me give to them, saw me give to them\r\nThem man are liars, they could never spaz like this\r\nThey can never vibe like this\r\nDeno, dos, tres killed this shit\r\n16, I'm a boss, but I'm your father\r\nMotorola, bros on the road now\r\nThe paigons running\r\nBetter go down, making us slow now\r\nTake no warning\r\nMy mandem mad, don't be sad\r\nI'm on a motorola\r\nMy mandem can, don't be sad\r\nWe taking over\r\nAyy\r\nGot the driver moving scatty 'cause yeah they wan' pree us\r\nEven when we're in a Prius, same pattern in an Addy\r\nBaitface, can't even get a K or a patty\r\nBut I'm getting swarmed, I wish I wore me a bally\r\nJatties and promoters in my DMs on the regular\r\nRolling in the motor talking commas on my cellular\r\nOut 'ere you woulda though I'm a new gen\r\n'Cause I be shelling shows since the 32 10\r\nI should be calling on my Lyca (Hello), and I don't even like her\r\nYeah, she A1, but she ain't the one, so I'mma only one night her\r\nWe feed off the energy, as if I need me more frenemies\r\nAnd what's up with all this iOS\r\nAbout I need to update, it's all stress\r\nI wish I had a\r\nMotorola, bros on the road now\r\nThe paigons running (paigons)\r\nBetter go down (better go), making us slow now (making us slow now)\r\nTake no warning\r\nMy mandem mad, don't be sad\r\nI'm on a motorola\r\nMy mandem can, don't be sad\r\nWe taking over\r\nJheeee!\r\nBeatfreakz!<\/pre>\n<\/details>\n","protected":false},"excerpt":{"rendered":"<p>aria-owns is surprisingly strong magic aria-owns allows developers to restructure the parent-child relationships in the accessibility tree. This means that screen reader users may experience a different semantic structure and meaning to other users when they navigate and interact with content using their screen readers virtual\/browse mode. Accessibility Tree Tree of accessible objects that represents [&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-703","post","type-post","status-publish","format-standard","hentry","category-htmlaccessibility"],"_links":{"self":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/703","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=703"}],"version-history":[{"count":21,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/703\/revisions"}],"predecessor-version":[{"id":729,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/703\/revisions\/729"}],"wp:attachment":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/media?parent=703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/categories?post=703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/tags?post=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}