tor-browser

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

test_aria_list.html (2177B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <title>ARIA lists</title>
      5  <link rel="stylesheet" type="text/css"
      6        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
      7 
      8  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
      9 
     10  <script type="application/javascript"
     11          src="../common.js"></script>
     12  <script type="application/javascript"
     13          src="../role.js"></script>
     14 
     15  <script type="application/javascript">
     16    function doTest() {
     17      // ////////////////////////////////////////////////////////////////////////
     18      // list
     19 
     20      var accTree =
     21        { LIST: [
     22          { LISTITEM: [
     23            { TEXT_LEAF: [ ] },
     24          ] },
     25        ] };
     26 
     27      testAccessibleTree("list", accTree);
     28 
     29      // ////////////////////////////////////////////////////////////////////////
     30      // strange list (mix of ARIA and HTML)
     31 
     32      accTree = { // div@role="list"
     33        role: ROLE_LIST,
     34        children: [
     35          { // li
     36            role: ROLE_TEXT_CONTAINER,
     37            children: [
     38              { // li text leaf
     39                role: ROLE_TEXT_LEAF,
     40                name: "item1",
     41                children: [ ],
     42              },
     43            ],
     44          },
     45          { // li@role="listitem"
     46            role: ROLE_LISTITEM,
     47            children: [
     48              { // text leaf
     49                role: ROLE_TEXT_LEAF,
     50                name: "item2",
     51                children: [ ],
     52              },
     53            ],
     54          },
     55        ],
     56      };
     57 
     58      testAccessibleTree("strange_list", accTree);
     59 
     60      SimpleTest.finish();
     61    }
     62 
     63    SimpleTest.waitForExplicitFinish();
     64    addA11yLoadEvent(doTest);
     65  </script>
     66 </head>
     67 <body>
     68 
     69  <a target="_blank"
     70     title="Build the context dependent tree"
     71     href="https://bugzilla.mozilla.org/show_bug.cgi?id=804461">
     72    Mozilla Bug 804461
     73  </a>
     74  <p id="display"></p>
     75  <div id="content" style="display: none"></div>
     76  <pre id="test">
     77  </pre>
     78 
     79  <div id="list" role="list">
     80    <div role="listitem">item1</div>
     81  </div>
     82 
     83  <div id="strange_list" role="list">
     84    <ul role="presentation">
     85      <li>item1</li>
     86      <li role="listitem">item2</li>
     87    </ul>
     88  </div>
     89 </body>
     90 </html>