<script type="application/javascript">
/**
* Return true if TD element has a generic accessible.
*/
function isTDGeneric(aID) {
return isAccessible(aID) && !isAccessible(aID, nsIAccessibleTableCell);
}
function checkIfNotAccessible(aID) {
ok(!isAccessible(aID), "'" + aID + "' shouldn't be accessible");
}
function checkIfTDGeneric(aID) {
ok(isTDGeneric(aID), "'" + aID + "' shouldn't have cell accessible");
}
function doTest() {
// //////////////////////////////////////////////////////////////////////////
// HTMLtable elements outside table context.
// //////////////////////////////////////////////////////////////////////////
// HTML list elements outside list context.
ok(!isAccessible("presentation_ul"), "presentational ul shouldn't be accessible");
ok(isAccessible("item_in_presentation_ul"), "li in presentational ul should have generic accessible");
ok(isAccessible("styleditem_in_presentation_ul"), "list styled span in presentational ul should have generic accessible");
ok(!isAccessible("presentation_ol"), "presentational ol shouldn't be accessible");
ok(isAccessible("item_in_presentation_ol"), "li in presentational ol should have generic accessible");
ok(!isAccessible("presentation_dl"), "presentational dl shouldn't be accessible");
ok(!isAccessible("dt_in_presentation_dl"), "dt in presentational dl shouldn't be accessible");
ok(!isAccessible("dd_in_presentation_dl"), "dd in presentational dl shouldn't be accessible");
tree =
{ PUSHBUTTON: [ // ul
{ TEXT_CONTAINER: [ // li
{ LISTITEM_MARKER: [ ] },
{ TEXT_LEAF: [ ] },
] },
{ TEXT_CONTAINER: [ // span styled as a list
{ LISTITEM_MARKER: [ ] },
{ TEXT_LEAF: [ ] },
] },
] };
testAccessibleTree("button_ul", tree);
tree =
{ PUSHBUTTON: [ // ol
{ TEXT_CONTAINER: [ // li
{ LISTITEM_MARKER: [ ] },
{ TEXT_LEAF: [ ] },
] },
] };
testAccessibleTree("button_ol", tree);
<!-- HTML table elements out of table -->
<table role="presentation">
<tr id="tr_in_presentation_table">
<th id="th_in_presentation_table">not a header</th>
<td id="td_in_presentation_table">not a cell</td>
</tr>
</table>
<table role="button" id="button_table">
<tr id="tr_in_button_table">
<th id="th_in_button_table">not a header</th>
<td id="td_in_button_table">not a cell</td>
</tr>
</table>
<!-- HTML list elements out of list -->
<ul role="presentation" id="presentation_ul">
<li id="item_in_presentation_ul">item</li>
<span id="styleditem_in_presentation_ul" style="display:list-item">Oranges</span>
</ul>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.