Accessibility/Accessible Table Implementation: Difference between revisions

 
Line 72: Line 72:


== <code> getIndexInParent</code> Method Synchronization ==
== <code> getIndexInParent</code> Method Synchronization ==
When we deal with tables then AT requires method <code>getIndexInParent</code> of accessible object should be synchronized with methods of accessible table. It's valid for ATK but it makes sense for IA2 as well. In details, when <code>getIndexInParent</code> called on the table cell should return index that is used in <code>getRowAtIndex</code> and <code>getColumnAtIndex</code> methods. This rule assumes the table cells must be direct children of the table accessible. Firefox table implementation broke this rule in some cases.
When we deal with tables, AT requires that the method <code>getIndexInParent</code> of accessible object is synchronized with methods of the accessible table interface. It's valid for ATK but it makes sense for IA2 as well. In detail,, when <code>getIndexInParent</code> is called on any table cell, it should return an index that is then being used in <code>getRowAtIndex</code> and <code>getColumnAtIndex</code> methods. This rule assumes the table cells must be direct children of the table accessible. Firefox table implementation broke this rule in some cases.


=== HTML static tables in ATK ===
=== HTML static tables in ATK ===
Line 83: Line 83:
   </tr>
   </tr>
   <tr role="some_aria_role">
   <tr role="some_aria_role">
     <td>cell3</td><td>cell3</td>
     <td>cell3</td><td>cell4</td>
   </tr>
   </tr>
</table>
</table>
</pre>
</pre>


The accessible tree should looks like:
The accessible tree should look like this:
<pre>
<pre>
table
table
Line 98: Line 98:
</pre>
</pre>


Here we get the problem. We should expose accessible for html:tr element since it's accessible and therefore the rule above is broken.
Here we get the problem. We should expose an accessible for html:tr element since it's accessible. Therefore, the rule above is broken.


=== List Tables in MSAA/IA2 ===
=== List Tables in MSAA/IA2 ===


It was mentioned above tables in MSAA/IA2 are exposed as lists. Since table cells can contain anything then we can't expose just name and description on table accessible and we should expose accessible for table, table rows and table cells. Therefore we will broke synchronization of <code>IAccessibleTable</code> interface methods with <code>getIndexInParent</code> method like we have for the case of static HTML table in ATK.
It was mentioned above that tables in MSAA/IA2 are exposed as lists. Since table cells can contain anything, we can't just expose name and description on the table accessible, and we should expose accessible for table, table rows and table cells. Therefore we will break synchronization of <code>IAccessibleTable</code> interface methods with the <code>getIndexInParent</code> method like we have for the case of static HTML table in ATK.


=== Outline in MSAA/IA2 ===
=== Outline in MSAA/IA2 ===


Currently XUL tree is exposed as outline. We don't expose all cells but primary one only. Therefore we lost the some information (for example bug 360510 where cell with checkbox isn't exposed).
Currently XUL tree is exposed as outline. We don't expose any cells but the primary one. Therefore we lose some information (for example bug 360510 where the cell with checkbox isn't exposed).


=== Possible approaches ===
=== Possible approaches ===
We can't extend ATK and IA2 in order to add new method instead of <code>getIndexParent</code> so we could use accessible attributes to put index in table on the cell. The disadvantage of the approach is the requirement to parse attribute string. Another disadvantages is old screen readers won't work with that.
We can't extend ATK and IA2 in order to add a new method in place of <code>getIndexInParent</code>. Instead, we could use accessible attributes to put the cell's index in the table on each cell. The disadvantage of this approach is the requirement to parse the attribute string. Another disadvantage is that old screen readers won't work with that.
Confirmed users
292

edits