Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h1>Testing Chrome <code>aria-owns</code> on Disabled Fields</h1>

<p>
  A disabled field still gets its accessible name from its associated <code>&lt;label&gt;</code> (associated via <code>for</code>, not from nesting). You can even put <code>aria-hidden="true"</code> on the <code>&lt;label&gt;</code> (or its ancestor) and it will still be exposed as the accessible name in browsers. But if you put <code>aria-owns</code> on the <code>aria-hidden</code> <code>&lt;label&gt;</code>, the associated field is yanked completely out of the accessibility tree in Chrome (tested in 79-81 on Windows, macOS, Android) and the Chrome accessibility inspector claims the <code>aria-hidden</code> <code>&lt;label&gt;</code> is its ancestor. Example 4 shows this in action, with the first three examples building up to it.
</p>

<p>
  See related suspected <a href="https://codepen.io/aardrian/pen/vYNNbqq">Chrome issue with <code>aria-owns</code> and control type announcement in JAWS</a>.
</p>

<div>
  <label for="field1">Example 1</label><br>
  <input type="text" id="field1">
</div>

<div>
  <label for="field2">Example 2</label><br>
  <input type="text" id="field2" disabled>
</div>

<div>
  <label for="field3" aria-hidden="true">Example 3</label><br>
  <input type="text" id="field3" disabled>
</div>

<div>
  <label for="field4" aria-hidden="true" aria-owns="field4">Example 4</label><br>
  <input type="text" id="field4" disabled>
</div>

<p>
  Firefox has no such problem. While it will not assign the <code>aria-hidden</code> <code>&lt;label&gt;</code> as the field's accessible name, it also does not yank the field completely out of the page. Safari has no such problem. ChromiEdge behaves as Chrome.
</p>

<p>
  <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1071123">Issue 1071123: aria-owns with aria-hidden on a label hides disabled fields from AT</a>
</p>

<h2>Update: 21 May 2020</h2>

<p>
  This is some text, and then <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1071123" aria-owns="Foo Bar" aria-hidden="false" id="LinkOwner">a link to the bug</a>. Meanwhile, this <span id="Foo">string of text</span> is aria-owned by the preceding link.
</p>

<h3 id="Bar">This heading is owned by the link</h3>

<button aria-owns="Baz" aria-hidden="false" id="ButtonOwner">This button owns the next heading</button>

<h3 id="Baz">This one is owned by a button</h3>

<details aria-owns="LinkOwner ButtonOwner">
  <summary>This owns the link and the button that own the things</summary>
  You should not be able to navigate this at all?
</details>


              
            
!

CSS

              
                body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
  /*   line-height: 1.5; */
  /*   letter-spacing: 0.12em; */
  /*   word-spacing: 0.16em; */
}

div {
  margin: 1em 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console