mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 834120 - Table cell accessibles not exposed for CSS table without table-row, r=tbsaunde
This commit is contained in:
parent
6743609509
commit
ffad930fa8
@ -1422,8 +1422,10 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
|
|||||||
newAcc = new HTMLTableAccessibleWrap(aContent, document);
|
newAcc = new HTMLTableAccessibleWrap(aContent, document);
|
||||||
break;
|
break;
|
||||||
case eHTMLTableCellType:
|
case eHTMLTableCellType:
|
||||||
// Accessible HTML table cell must be a child of accessible HTML table row.
|
// Accessible HTML table cell should be a child of accessible HTML table
|
||||||
if (aContext->IsHTMLTableRow())
|
// or its row (CSS HTML tables are polite to the used markup at
|
||||||
|
// certain degree).
|
||||||
|
if (aContext->IsHTMLTableRow() || aContext->IsHTMLTable())
|
||||||
newAcc = new HTMLTableCellAccessibleWrap(aContent, document);
|
newAcc = new HTMLTableCellAccessibleWrap(aContent, document);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -487,6 +487,7 @@ public:
|
|||||||
bool IsHTMLListItem() const { return mType == eHTMLLiType; }
|
bool IsHTMLListItem() const { return mType == eHTMLLiType; }
|
||||||
HTMLLIAccessible* AsHTMLListItem();
|
HTMLLIAccessible* AsHTMLListItem();
|
||||||
|
|
||||||
|
bool IsHTMLTable() const { return mType == eHTMLTableType; }
|
||||||
bool IsHTMLTableRow() const { return mType == eHTMLTableRowType; }
|
bool IsHTMLTableRow() const { return mType == eHTMLTableRowType; }
|
||||||
|
|
||||||
bool IsImage() const { return mType == eImageType; }
|
bool IsImage() const { return mType == eImageType; }
|
||||||
|
@ -343,16 +343,6 @@ HTMLTableRowAccessible::NativeRole()
|
|||||||
// HTMLTableAccessible
|
// HTMLTableAccessible
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
HTMLTableAccessible::
|
|
||||||
HTMLTableAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
|
||||||
AccessibleWrap(aContent, aDoc), xpcAccessibleTable(this)
|
|
||||||
{
|
|
||||||
mGenericTypes |= eTable;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// HTMLTableAccessible: nsISupports implementation
|
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS_INHERITED1(HTMLTableAccessible, Accessible,
|
NS_IMPL_ISUPPORTS_INHERITED1(HTMLTableAccessible, Accessible,
|
||||||
nsIAccessibleTable)
|
nsIAccessibleTable)
|
||||||
|
|
||||||
|
@ -121,7 +121,12 @@ class HTMLTableAccessible : public AccessibleWrap,
|
|||||||
public TableAccessible
|
public TableAccessible
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLTableAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
HTMLTableAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||||
|
AccessibleWrap(aContent, aDoc), xpcAccessibleTable(this)
|
||||||
|
{
|
||||||
|
mType = eHTMLTableType;
|
||||||
|
mGenericTypes |= eTable;
|
||||||
|
}
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
|
|
||||||
|
@ -128,6 +128,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=410052
|
|||||||
];
|
];
|
||||||
testTableIndexes("tableinsane6", idxes);
|
testTableIndexes("tableinsane6", idxes);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
// csstablecrazy1 (no rows)
|
||||||
|
idxes = [
|
||||||
|
[0, 1]
|
||||||
|
];
|
||||||
|
|
||||||
|
testTableIndexes("csstablecrazy1", idxes);
|
||||||
|
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +145,16 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=410052
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=410052">Mozilla Bug 410052</a>
|
<a target="_blank"
|
||||||
|
title="GetIndexAt and GetRowAtIndex and GetColumnAtIndex on HTML tables are inconsistent"
|
||||||
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=410052">
|
||||||
|
Bug 410052
|
||||||
|
</a>
|
||||||
|
<a target="_blank"
|
||||||
|
title="Table cell accessibles not exposed for CSS table without table-row "
|
||||||
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=834120">
|
||||||
|
Bug 834120
|
||||||
|
</a>
|
||||||
<p id="display"></p>
|
<p id="display"></p>
|
||||||
<div id="content" style="display: none"></div>
|
<div id="content" style="display: none"></div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
@ -402,5 +419,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=410052
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<div id="csstablecrazy1"
|
||||||
|
style="width: 100%; border: 1px solid red; display:table;">
|
||||||
|
<div style="display:table-cell;">cell1</div>
|
||||||
|
<div style="display:table-cell;">cell2</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user