chromium/third_party/blink/web_tests/accessibility/name-calc-presentational.html

<!DOCTYPE HTML>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>

<div class="container">
  <div tabIndex=0 role="link" id="link1">
    I
    <img src="hidden.jpg" alt="do not" role="presentation" />
    like ice cream.
  </div>

  <div tabIndex=0 role="link" id="link2">
    I
    <span role="presentation" style="display:none">do not</span>
    like ice cream.
  </div>
</div>

<script>
test(function(t) {
    var axLink1 = accessibilityController.accessibleElementById("link1");
    assert_equals(axLink1.name, "I like ice cream.");
}, "Presentational element ignored in name calculation..");

test(function(t) {
    var axLink2 = accessibilityController.accessibleElementById("link2");
    assert_equals(axLink2.name, "I like ice cream.");
}, "Display none presentational element ignored in name calculation..");
</script>