- From: <bugzilla@jessica.w3.org>
- Date: Sat, 22 Feb 2014 17:36:55 +0000
- To: public-html-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24679 --- Comment #10 from Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no> --- http://lists.w3.org/Archives/Public/public-html-a11y/2014Feb/0063 James pointed to Webkit: > Just copy what the open source browsers are doing already. For example: > > AccessibilityTable::isDataTable() > http://trac.webkit.org/browser/trunk/Source/WebCore/accessibility/AccessibilityTable.cpp#L93 What Webkit does, based on that page (summary based on code comments): 1) [L.98] Table is not data table if @role is present. 2) [L.102] Except if table is inside contentEditable secion = always data table 3) [L.108] Heuristic section. Assumption: table is not data tab. unless data table signals present [L.117] CAPTION/@summary/THEAD/TFOOT = most certainly a data table [L.122] // if someone used "rules" attribute than the table should appear [L.126] // if there's a colgroup or col element, it's probably a data table. [L.132] // go through … cell's … check for tell-tale signs of "data" table … // … borders, or … attributes like headers, abbr, scope or axis [L.142] // If there's only one cell, it's not a good AXTable candidate. [L.146] // If there are at least 20 rows, we'll call it a data table. [L.150] Zebra striping and other signals: // Store … background color of … table to check against cell's background … // 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 [L.189] // first row is comprised of all <th> tags, assume it is a data table [L.193] // first column is … all <th> tags, assume it is a data table. [L.197] explicitly assigned a "data" table attribute [double checking to see if @abbr, @axis, @headers, @abbr is empty????] [L.206] // If the empty-cells style is set, we'll call it a data table [L.210] //If a cell has matching bordered sides, call it a (fully) bordered cell. [L.215] // Also keep track of each individual border, so we can catch tables where most // cells have a bottom border, for example. [L.226] // 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). [L.230] // If we've found 10 "good" cells, we don't need to keep searching. [L.237] // For the first 5 rows, cache the background color so we can check if this table has zebra-striped rows. [L.256] // if there is less than two valid cells, it's not a data table [L.260] // half of the cells had borders, it's a data table [L.269] // half had different background colors, it's a data table [L.273] // Check if there is an alternating row background color indicating a zebra striped style pattern. [L.299] // If the developer assigned an aria role to this, then we // shouldn't expose it as a table, unless, of course, the aria // role is a table. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Saturday, 22 February 2014 17:36:57 UTC