+2008-10-01 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Update table detection tests by adding two more tables
+
+ * accessibility/table-detection.html:
+ * accessibility/table-detection-expected.txt:
+ * platform/mac-snowleopard/accessibility/table-detection-expected.txt:
+
2008-10-02 Adele Peterson <adele@apple.com>
Update results for mac-tiger.
asdf asdf
// this should be a table because it has the "rules" attr
asdf asdf
+// this should not be a table because it only has one valid cell (need more than one)
+Contributions
+// this should not be a table because it does not have enough cell borders or background colors
+Politics
+Decision '08
+The debates
+The White House
+Capitol Hill
+National Journal
+New York Times
--------------------------
AXRole: AXGroup
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 36}
+AXSize: NSSize: {769, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {769, 25}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {769, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {769, 36}
AXTitle:
AXDescription:
AXValue:
<tr><td>asdf</td><td>asdf</td></tr>
</table>
+ // this should not be a table because it only has one valid cell (need more than one)
+ <style type="text/css">
+ .appPol_080915_Lehman_Contributions { } .labelPol_080915_Lehman_Contributions { undefined } .hedPol_080915_Lehman_Contributions { font-size: 19px; font-family:arial; font-weight:bold;color:#26386b;border-top:1px solid #a4abc1;border-left:1px solid #a4abc1;border-right:1px solid #a4abc1;font-family: Arial, Helvetica, sans-serif; font-size: 100%;font-weight:bold;padding-left:4px;width:90%;height:25px; } .deckPol_080915_Lehman_Contributions { color:#666;font-weight:bold; font-family:verdana; font-size:11px;padding:5px 9px; } .subhedPol_080915_Lehman_Contributions { font-weight:bold;text-decoration:none;text-transform:uppercase;padding:3px 3px; } .colhdrPol_080915_Lehman_Contributions { color:ffffff; font-size:10px;font-weight:bold;background-color:999999; } .font1Pol_080915_Lehman_Contributions { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 70%; line-height: 140%; } .boxB_Pol_080915_Lehman_Contributions { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 70%; line-height: 140%;;border-left:1px #a4abc1 solid;border-bottom:1px #a4abc1 solid;border-right:1px #a4abc1 solid; ;width:100%; } .headlinePol_080915_Lehman_Contributions { font-weight:bold; } .headlinePol_080915_Lehman_Contributions:hover { } .headlinePol_080915_Lehman_Contributions:visited { font-weight:bold;} .captionPol_080915_Lehman_Contributions { undefined} #NoBg { background-color:transparent; } .navlinkPol_080915_Lehman_Contributions { color:000000;font-size: 10px;font-family:verdana;line-height: 130%;text-decoration:none; } .navlinkPol_080915_Lehman_Contributions:hover { color:cc3333; } .navlinkPol_080915_Lehman_Contributions:active { color:#cc0000; } .navCellPol_080915_Lehman_Contributions { width:20px;text-align:center;background-color:#EEEEEE;border-left:1px #CCCCCC solid;border-top:1px #CCCCCC solid;padding:2px;cursor:hand;width:100%; } .bulletPol_080915_Lehman_Contributions { color:CC0000;font-family:verdana;font-size:11px;font-weight:bold;color:cc3333; }
+ </style>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr>
+ <td nowrap="1" class="labelPol_080915_Lehman_Contributions">
+ <td nowrap="1" class="hedPol_080915_Lehman_Contributions">Contributions</td>
+ </tr></table>
+
+
+ // this should not be a table because it does not have enough cell borders or background colors
+ <style type="text/css">
+ .nmIS,.nmISH{padding-left:20px;padding-right:12px;cursor:pointer;}
+ .nmIP{padding-left:20px;padding-right:12px;font:60% Tahoma,sans-serif;color:#CC0000}
+ .nmIB,.nmIBH,.nmIBD,.nmIBDH,.nmIK,.nmIKH,.nmIKD,.nmIKDH{padding-left:12px;padding-right:12px;cursor:pointer;}
+ .nmIS,.nmISH,.nmIP{border-bottom:1px solid #CCCCCC}
+ .nmIS,.nmIBH,.nmIBDH,.nmIKH,.nmIP{background-color:#EEEEEE}
+ .nmIKD,.nmIKDH{background-color:#CC0000}
+ .nmISH,.nmIB,.nmIBD,.nmIK{background-color:white}
+ .nmLS,.nmLSH,.nmLB,.nmLBH,.nmLBD,.nmLBDH,.nmLK,.nmLKH,.nmLKD,.nmLKDH{font:70% Tahoma,sans-serif}
+ .nmLS,.nmLSH,.nmLBD,.nmLBDH,.nmLKD,.nmLKDH,.nmIP{font-weight:bold}
+ .nmLK,.nmLK:visited,.nmLKH,.nmLKH:visited{color:black;text-decoration:none}
+ .nmLS,.nmLS:visited,.nmLS:hover,.nmLS:active,.nmLSH,.nmLSH:visited,.nmLSH:hover,.nmLSH:active,.nmLB,.nmLB:visited,.nmLBH,.nmLBH:visited,.nmLBD,.nmLBD:visited,.nmLBD:hover,.nmLBD:active,.nmLBDH,.nmLBDH:visited,.nmLBDH:hover,.nmLBDH:active{color:black !important;text-decoration:none}
+ .nmLB:hover,.nmLBH:hover,nmLK:hover,.nmLKH:hover{color:#CC0000;text-decoration:underline}
+ .nmLB:active,.nmLBH:active,.nmLK:active,.nmLKH:active{color:#CC0000;text-decoration:none}
+ .nmLKD,.nmLKD:visited,.nmLKD:hover,.nmLKD:active,.nmLKDH,.nmLKDH:visited,.nmLKDH:hover,.nmLKDH:active{color:white;text-decoration:none}
+ .nmLKD:visited:hover,.nmLKDH:visited:hover{text-decoration:underline;color:white;}
+ .nmTB{border-top:1px solid #CCCCCC;border-left:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC}
+ .nmTK{border-left:3px solid #CC0000;border-bottom:3px solid #CC0000}
+ .nmX{position:absolute;z-index: 100000000;left:0;top:0;height:0;line-height:0px}
+ .nmTB,.nmTK{margin-bottom:2px}
+ .nmTB,.nmTK,.nmTS{text-align:left;}
+ .nmTS {width: 130px;}
+ .nmTB {width: 130px; margin: 0px !important; border-left: 0px; border-top: 0px;}
+ .nmTB{margin-top:12px}
+ .nmCM{padding-top:2px;display:block;height:20px;}
+ .nmCM:visited:hover{text-decoration:none;color:#000000;}
+ </style>
+ <table class="nmTB" cellpadding="0" cellspacing="0"><tr><td class="nmIBD" id="nmb" name="nmb" nm_sn="3032552" nm_suf="" CM_sf="Ex" CM="NewsMenuL1" pn="newsmenu" ct="nm0" cn="Politics"><a class="nmLBD" href="/id/3032553">Politics</a></td></tr><tr><td class="nmIB" id="nmb" name="nmb" nm_sn="18970411" nm_suf="" CM_sf="Ex" CM="NewsMenuL1" pn="newsmenu" ct="nxf" cn="Decision '08"><a class="nmLB" href="/id/18970417">Decision '08</a></td></tr><tr><td class="nmIB" id="nmb" name="nmb" nm_sn="18296896" nm_suf="" CM_sf="Ex" CM="NewsMenuL1" pn="newsmenu" ct="nxf" cn="The debates"><a class="nmLB" href="/id/18296908">The debates</a></td></tr><tr><td class="nmIB" id="nmb" name="nmb" nm_sn="21491043" nm_suf="" CM_sf="Ex" CM="NewsMenuL1" pn="newsmenu" ct="nxf" cn="The White House"><a class="nmLB" href="/id/21672863">The White House</a></td></tr><tr><td class="nmIB" id="nmb" name="nmb" nm_sn="21491571" nm_suf="" CM_sf="Ex" CM="NewsMenuL1" pn="newsmenu" ct="nxf" cn="Capitol Hill"><a class="nmLB" href="/id/21672985">Capitol Hill</a></td></tr><tr><td class="nmIB" id="nmb" name="nmb" nm_sn="14016004" nm_suf="" CM_sf="Ex" CM="NewsMenuL1" pn="newsmenu" ct="nxf" cn="National Journal"><a class="nmLB" href="/id/14016001">National Journal</a></td></tr><tr><td class="nmIB" id="nmb" name="nmb" nm_sn="19748467" nm_suf="" CM_sf="Ex" CM="NewsMenuL1" pn="newsmenu" ct="nxf" cn="New York Times"><a class="nmLB" href="/id/19747577">New York Times</a></td></tr></table>
+
<div id="result"></div>
<script>
asdf asdf
// this should be a table because it has the "rules" attr
asdf asdf
+// this should not be a table because it only has one valid cell (need more than one)
+Contributions
+// this should not be a table because it does not have enough cell borders or background colors
+Politics
+Decision '08
+The debates
+The White House
+Capitol Hill
+National Journal
+New York Times
--------------------------
AXRole: AXGroup
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 18}
+AXSize: NSSize: {769, 18}
AXTitle:
AXDescription:
AXValue:
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
-AXSize: NSSize: {784, 36}
+AXSize: NSSize: {769, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {769, 25}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {769, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {130, 13}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: (null)
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {769, 36}
AXTitle:
AXDescription:
AXValue:
+2008-10-02 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21280
+ <rdar://problem/6227690> There are a bunch of tables on this page that don't seem to be real tables
+
+ Updated AXTable detection to be more robust to false-positives. Specifically, added checks
+ to ensure that there is more than one valid table cell, and that at least half of the cells
+ have borders or have specific background colors. Modified the table detection layout test
+ to test for the tables mentioned in the bug
+
+ * page/AccessibilityTable.cpp:
+ (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
+
2008-10-02 Darin Adler <darin@apple.com>
Reviewed by Geoff Garen.
bool AccessibilityTable::isTableExposableThroughAccessibility()
{
+ // the following is a heuristic used to determine if a
+ // <table> should be exposed as an AXTable. The goal
+ // is to only show "data" tables
+
if (!m_renderer || !m_renderer->isTable())
return false;
return false;
Color tableBGColor = tableStyle->backgroundColor();
- // check no more than 2 rows for the sake of speed.
- for (int row = 0; row < numRows && row < 2; ++row) {
- for (int col = 0; col < numCols; ++col) {
+ // check enough of the cells to find if the table matches our criteria
+ // Criteria:
+ // 1) must have at least one valid cell (and)
+ // 2) at least half of cells have borders (or)
+ // 3) at least half of cells have different bg colors than the table, and there is cell spacing
+ unsigned validCellCount = 0;
+ unsigned borderedCellCount = 0;
+ unsigned backgroundDifferenceCellCount = 0;
+
+ for (int row = 0; row < numRows; ++row) {
+ for (int col = 0; col < numCols; ++col) {
RenderTableCell* cell = firstBody->cellAt(row, col).cell;
if (!cell)
continue;
if (!cellNode)
continue;
+ if (cell->width() < 1 || cell->height() < 1)
+ continue;
+
+ validCellCount++;
+
HTMLTableCellElement* cellElement = static_cast<HTMLTableCellElement*>(cellNode);
+ // in this case, the developer explicitly assigned a "data" table attribute
if (!cellElement->headers().isEmpty() || !cellElement->abbr().isEmpty() ||
!cellElement->axis().isEmpty() || !cellElement->scope().isEmpty())
return true;
RenderStyle* renderStyle = cell->style();
if (!renderStyle)
continue;
+
+ // a cell needs to have matching bordered sides, before it can be considered a bordered cell.
+ if ((cell->borderTop() > 0 && cell->borderBottom() > 0) ||
+ (cell->borderLeft() > 0 && cell->borderRight() > 0))
+ borderedCellCount++;
- // at least one cell had a border, it is probably a data table
- if (renderStyle->border().hasBorder())
- return true;
-
- // do our cells have a different color from the table and is there cell spacing?
- // then probably this is a data table (there were no borders... spacing and
- // colors take the place of borders)
+ // if the cell has a different color from the table and there is cell spacing,
+ // then it is probably a data table cell (spacing and colors take the place of borders)
+ Color cellColor = renderStyle->backgroundColor();
if (table->hBorderSpacing() > 0 && table->vBorderSpacing() > 0 &&
- tableBGColor != renderStyle->backgroundColor())
+ tableBGColor != cellColor && cellColor.alpha() != 1)
+ backgroundDifferenceCellCount++;
+
+ // if we've found 10 "good" cells, we don't need to keep searching
+ if (borderedCellCount >= 10 || backgroundDifferenceCellCount >= 10)
return true;
}
}
+ // if there is less than two valid cells, it's not a data table
+ if (validCellCount <= 1)
+ return false;
+
+ // half of the cells had borders, it's a data table
+ unsigned neededCellCount = validCellCount / 2;
+ if (borderedCellCount >= neededCellCount)
+ return true;
+
+ // half had different background colors, it's a data table
+ if (backgroundDifferenceCellCount >= neededCellCount)
+ return true;
+
return false;
}