test_css_tables.html (2944B)
1 <!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en"> 2 <html> 3 <head> 4 <title>CSS display:table is not a table</title> 5 <meta http-equiv="content-type" content="text/html; charset=UTF-8"> 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="../role.js"></script> 15 16 <script type="application/javascript"> 17 18 function doTest() { 19 // //////////////////////////////////////////////////////////////////////// 20 // elements with display:table 21 22 // only display:table 23 var accTree = 24 { SECTION: [ 25 { TEXT_LEAF: [ ] }, 26 ] }; 27 testAccessibleTree("table1", accTree); 28 29 // only display:table and display:table-cell 30 accTree = 31 { SECTION: [ 32 { SECTION: [ 33 { TEXT_LEAF: [ ] }, 34 ] }, 35 ] }; 36 testAccessibleTree("table2", accTree); 37 38 // display:table, display:table-row, and display:table-cell 39 accTree = 40 { SECTION: [ 41 { SECTION: [ 42 { TEXT_LEAF: [ ] }, 43 ] }, 44 ] }; 45 testAccessibleTree("table3", accTree); 46 47 // display:table, display:table-row-group, display:table-row, and display:table-cell 48 accTree = 49 { SECTION: [ 50 { SECTION: [ 51 { TEXT_LEAF: [ ] }, 52 ] }, 53 ] }; 54 testAccessibleTree("table4", accTree); 55 56 // display:inline-table 57 accTree = 58 { TEXT_CONTAINER: [ 59 { TEXT_CONTAINER: [ 60 { TEXT_LEAF: [ ] }, 61 ] }, 62 ] }; 63 testAccessibleTree("table5", accTree); 64 65 SimpleTest.finish(); 66 } 67 68 SimpleTest.waitForExplicitFinish(); 69 addA11yLoadEvent(doTest); 70 </script> 71 </head> 72 73 <body> 74 <a target="_blank" 75 title=" div with display:table exposes table semantics" 76 href="https://bugzilla.mozilla.org/show_bug.cgi?id=1007975">Mozilla Bug 1007975</a> 77 78 <p id="display"></p> 79 <div id="content" style="display: none"></div> 80 <pre id="test"> 81 </pre> 82 83 <div id="table1" style="display:table"> 84 table1 85 </div> 86 87 <div id="table2" style="display:table"> 88 <div style="display:table-cell">table2</div> 89 </div> 90 91 <div id="table3" style="display:table"> 92 <div style="display:table-row"> 93 <div style="display:table-cell">table3</div> 94 </div> 95 </div> 96 97 <div id="table4" style="display:table"> 98 <div style="display:table-row-group"> 99 <div style="display:table-row"> 100 <div style="display:table-cell">table4</div> 101 </div> 102 </div> 103 </div> 104 105 <div> 106 <span id="table5" style="display:inline-table"> 107 <span style="display:table-row"> 108 <span style="display:table-cell">table5</div> 109 </span> 110 </span> 111 </div> 112 113 </body> 114 </html>