chromium/third_party/blink/web_tests/accessibility/aria-hidden.html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
</head>
<body>
  <div id="container">
    <h1 aria-hidden="true">h1 <b>test</b></h1>
    <h2 aria-hidden="false">h2</h2>
  </div>

<button style="display:none" aria-describedby="container">Do not remove aria-hidden nodes from tree within #container</button>

<script>
test((t) => {
    var container = accessibilityController.accessibleElementById("container");
    var h1 = container.childAtIndex(0);
    assert_equals(h1.name, ""); // Name is empty because it's aria-hidden.
    assert_true(h1.isIgnored);
    var h2 = container.childAtIndex(1);
    assert_equals(h2.name, "h2");
    assert_false(h2.isIgnored);
}, "This tests that the aria-hidden attribute works correctly with accessibility. The H1 element should be ignored and the H2 element should not be ignored, but they should both appear in the accessibility tree.");
</script>
</body>
</html>