Bug 525909 - support ARIA role=rowgroup, r=tbsaunde

This commit is contained in:
Alexander Surkov 2012-11-17 16:59:55 +09:00
Родитель dc213457f6
Коммит 7f808dbc53
6 изменённых файлов: 77 добавлений и 2 удалений

Просмотреть файл

@ -38,7 +38,7 @@ filters::GetRow(Accessible* aAccessible)
return eMatch | eSkipSubtree;
// Look for rows inside rowgroup.
if (role == roles::SECTION)
if (role == roles::GROUPING)
return eSkip;
return eSkipSubtree;

Просмотреть файл

@ -433,6 +433,16 @@ static nsRoleMapEntry sWAIRoleMaps[] =
kNoReqStates,
eARIASelectable
},
{ // rowgroup
&nsGkAtoms::rowgroup,
roles::GROUPING,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
kGenericAccType,
kNoReqStates
},
{ // rowheader
&nsGkAtoms::rowheader,
roles::ROWHEADER,

Просмотреть файл

@ -18,7 +18,7 @@ mozilla::a11y::ARIAGridCellAccessible::TableFor(Accessible* aRow) const
Accessible* table = aRow->Parent();
if (table) {
roles::Role tableRole = table->Role();
if (tableRole == roles::SECTION) { // if there's a rowgroup.
if (tableRole == roles::GROUPING) { // if there's a rowgroup.
table = table->Parent();
if (table)
tableRole = table->Role();

Просмотреть файл

@ -15,6 +15,7 @@ MOCHITEST_A11Y_FILES =\
dockids.html \
$(warning test_applicationacc.xul temporarily disabled, see bug 561508) \
test_aria_globals.html \
test_aria_grid.html \
test_aria_imgmap.html \
test_aria_menu.html \
test_aria_presentation.html \

Просмотреть файл

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<title>HTML table tests</title>
<link rel="stylesheet" type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="../common.js"></script>
<script type="application/javascript"
src="../role.js"></script>
<script type="application/javascript">
function doTest()
{
//////////////////////////////////////////////////////////////////////////
// grid having rowgroups
var accTree =
{ TABLE: [
{ GROUPING: [
{ ROW: [
{ GRID_CELL: [
{ TEXT_LEAF: [ ] }
] }
] }
] },
] };
testAccessibleTree("grid", accTree);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank"
title="Support ARIA role rowgroup"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=525909">
Mozilla Bug 525909
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<div id="grid" role="grid">
<div role="rowgroup">
<div role="row">
<div role="gridcell">cell</div>
</div>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -2091,6 +2091,7 @@ GK_ATOM(posinset, "posinset")
GK_ATOM(presentation, "presentation")
GK_ATOM(progressbar, "progressbar")
GK_ATOM(region, "region")
GK_ATOM(rowgroup, "rowgroup")
GK_ATOM(rowheader, "rowheader")
GK_ATOM(select1, "select1")
GK_ATOM(setsize, "setsize")