Bug 1177268 - implement aria-rowcount/index and aria-colcount/index, r=marcoz
This commit is contained in:
@@ -143,6 +143,19 @@ HTMLTableCellAccessible::NativeAttributes()
|
||||
return attributes.forget();
|
||||
}
|
||||
|
||||
GroupPos
|
||||
HTMLTableCellAccessible::GroupPosition()
|
||||
{
|
||||
int32_t count = 0, index = 0;
|
||||
if (nsCoreUtils::GetUIntAttr(Table()->AsAccessible()->GetContent(),
|
||||
nsGkAtoms::aria_colcount, &count) &&
|
||||
nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_colindex, &index)) {
|
||||
return GroupPos(0, index, count);
|
||||
}
|
||||
|
||||
return HyperTextAccessibleWrap::GroupPosition();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLTableCellAccessible: TableCellAccessible implementation
|
||||
|
||||
@@ -356,6 +369,19 @@ HTMLTableRowAccessible::NativeRole()
|
||||
return roles::ROW;
|
||||
}
|
||||
|
||||
GroupPos
|
||||
HTMLTableRowAccessible::GroupPosition()
|
||||
{
|
||||
int32_t count = 0, index = 0;
|
||||
if (nsCoreUtils::GetUIntAttr(nsAccUtils::TableFor(this)->GetContent(),
|
||||
nsGkAtoms::aria_rowcount, &count) &&
|
||||
nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_rowindex, &index)) {
|
||||
return GroupPos(0, index, count);
|
||||
}
|
||||
|
||||
return AccessibleWrap::GroupPosition();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLTableAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user