Bug 287740 - expose axis object attribute on table cells, r=marcoz

This commit is contained in:
Alexander Surkov 2011-11-24 19:31:41 +08:00
parent 2d482f7133
commit 4a30ef1f61
2 changed files with 8 additions and 1 deletions

View File

@ -160,6 +160,12 @@ nsHTMLTableCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttri
if (!abbrText.IsEmpty())
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::abbr, abbrText);
// axis attribute
nsAutoString axisText;
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::axis, axisText);
if (!axisText.IsEmpty())
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::axis, axisText);
return NS_OK;
}

View File

@ -94,6 +94,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
testAttrs("draggable", {"draggable" : "true"}, true);
testAttrs("th1", { "abbr": "SS#" }, true);
testAttrs("th2", { "abbr": "SS#" }, true);
testAttrs("th2", { "axis": "social" }, true);
SimpleTest.finish();
}
@ -180,7 +181,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
<table>
<tr>
<th id="th1"><abbr title="Social Security Number">SS#</abbr></th>
<th id="th2" abbr="SS#">Social Security Number</th>
<th id="th2" abbr="SS#" axis="social">Social Security Number</th>
</tr>
</table>
</body>