chromium/third_party/blink/web_tests/accessibility/aria-hidden-children-not-in-text-from-content.html

<!doctype html>
<html>
<body>
<script src="../resources/js-test.js"></script>

<div id="content">
<div id="checkbox1" role="checkbox" aria-checked="true">
  <span aria-hidden="true">On</span>
  <span aria-hidden="true" style="visibility: hidden;">Off</span>
</div>

<div id="checkbox2" role="checkbox" aria-checked="true">
  <span>Non-hidden descendant content</span>
  <span aria-hidden="true">On</span>
  <span aria-hidden="true" style="visibility: hidden;">Off</span>
</div>
</div>


<div id="console">
</div>

<script>
description('This tests that aria-hidden elements within an element are ' +
            'not included in accessible name from content');

if (window.testRunner && window.accessibilityController) {
    var checkbox1 = accessibilityController.accessibleElementById('checkbox1');
    shouldBe('checkbox1.name.trim()', "''");

    var checkbox2 = accessibilityController.accessibleElementById('checkbox2');
    shouldBe('checkbox2.name.trim()',
             "'Non-hidden descendant content'");

    document.getElementById('content').style.visibility = 'hidden';
}
</script>
</body>
</html>