tor-browser

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

test_aria_objattr.html (1779B)


      1 <html>
      2 
      3 <head>
      4  <title>Accessible ARIA object attribute changes</title>
      5 
      6  <link rel="stylesheet" type="text/css"
      7        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
      8 
      9  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
     10 
     11  <script type="application/javascript"
     12          src="../common.js"></script>
     13  <script type="application/javascript"
     14          src="../attributes.js"></script>
     15  <script type="application/javascript"
     16          src="../events.js"></script>
     17 
     18  <script type="application/javascript">
     19 
     20    /**
     21     * Do tests.
     22     */
     23    var gQueue = null;
     24    function updateAttribute(aID, aAttr, aValue) {
     25      this.node = getNode(aID);
     26      this.accessible = getAccessible(this.node);
     27 
     28      this.eventSeq = [
     29        new objAttrChangedChecker(aID, aAttr),
     30      ];
     31 
     32      this.invoke = function updateAttribute_invoke() {
     33        this.node.setAttribute(aAttr, aValue);
     34      };
     35 
     36      this.getID = function updateAttribute_getID() {
     37        return aAttr + " for " + aID + " " + aValue;
     38      };
     39    }
     40 
     41    // gA11yEventDumpToConsole = true;
     42    function doTests() {
     43      gQueue = new eventQueue();
     44 
     45      gQueue.push(new updateAttribute("sortable", "aria-sort", "ascending"));
     46 
     47      // For experimental ARIA extensions
     48      gQueue.push(new updateAttribute("custom", "aria-blah", "true"));
     49 
     50      gQueue.invoke(); // Will call SimpleTest.finish();
     51    }
     52 
     53    SimpleTest.waitForExplicitFinish();
     54    addA11yLoadEvent(doTests);
     55  </script>
     56 </head>
     57 
     58 <body>
     59  <p id="display"></p>
     60  <div id="content" style="display: none"></div>
     61  <pre id="test">
     62  </pre>
     63 
     64  <div id="sortable" role="columnheader" aria-sort="none">aria-sort</div>
     65 
     66  <div id="custom" role="custom" aria-blah="false">Fat free cheese</div>
     67 </body>
     68 </html>