tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ax-role-inference-owner.html (1732B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>HTML Test: focusgroup - Owner implied AX role inference</title>
      4 <meta name="assert" content="A generic focusgroup owner with a behavior token gets an implied minimum ARIA role; explicit and native roles are preserved.">
      5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
      6 <link rel="help" href="https://open-ui.org/components/scoped-focusgroup.explainer/">
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 
     10 <!-- Generic container (no explicit or native role) should inherit implied toolbar role. -->
     11 <div id=fgGeneric focusgroup="toolbar"><button>Item</button></div>
     12 <!-- Explicit author role must win over implied role. -->
     13 <div id=fgExplicit role="list" focusgroup="toolbar"><div>Item</div></div>
     14 <!-- Native semantics (UL -> list) must win over implied role. -->
     15 <ul id=fgNative focusgroup="toolbar"><li>Item</li></ul>
     16 
     17 <script>
     18 if (!window.accessibilityController) {
     19  test(() => { assert_true(true); }, 'accessibilityController not available (noop)');
     20 } else {
     21  test(() => {
     22    const ax = accessibilityController.accessibleElementById('fgGeneric');
     23    assert_equals(ax.role, 'AXRole: AXToolbar');
     24  }, 'Generic container focusgroup owner gets implied toolbar role');
     25 
     26  test(() => {
     27    const ax = accessibilityController.accessibleElementById('fgExplicit');
     28    assert_equals(ax.role, 'AXRole: AXList');
     29  }, 'Explicit author role is preserved over implied focusgroup role');
     30 
     31  test(() => {
     32    const ax = accessibilityController.accessibleElementById('fgNative');
     33    assert_equals(ax.role, 'AXRole: AXList');
     34  }, 'Native semantic list role is preserved over implied focusgroup role');
     35 }
     36 </script>