Bug 640707 - Add event support for aria-sort. r=surkov

Yahoo mail needs this ASAP.

--HG--
rename : accessible/tests/mochitest/events/test_aria_hidden.html => accessible/tests/mochitest/events/test_aria_objattr.html
This commit is contained in:
David Bolter 2011-05-17 12:33:45 -04:00
Родитель a519d6e979
Коммит b4edcad58f
3 изменённых файлов: 37 добавлений и 5 удалений

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

@ -1114,7 +1114,8 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
// at least until native API comes up with a more meaningful event.
if (aAttribute == nsAccessibilityAtoms::aria_grabbed ||
aAttribute == nsAccessibilityAtoms::aria_dropeffect ||
aAttribute == nsAccessibilityAtoms::aria_hidden) {
aAttribute == nsAccessibilityAtoms::aria_hidden ||
aAttribute == nsAccessibilityAtoms::aria_sort) {
FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_OBJECT_ATTRIBUTE_CHANGED,
aContent);
}

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

@ -51,8 +51,8 @@ _TEST_FILES =\
focus.html \
scroll.html \
test_aria_alert.html \
test_aria_hidden.html \
test_aria_menu.html \
test_aria_objattr.html \
test_aria_statechange.html \
test_attrs.html \
test_caretmove.html \

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

@ -1,7 +1,7 @@
<html>
<head>
<title>Accessible ARIA hidden attribute</title>
<title>Accessible ARIA object attribute changes</title>
<link rel="stylesheet" type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
@ -43,14 +43,38 @@
}
}
function updateSort(aID, aSort)
{
this.node = getNode(aID);
this.accessible = getAccessible(this.node);
this.eventSeq = [
new invokerChecker(EVENT_OBJECT_ATTRIBUTE_CHANGED, this.accessible),
];
this.invoke = function updateSort_invoke()
{
this.node.setAttribute("aria-sort", aSort);
}
this.getID = function updateSort_getID()
{
return "aria-sort for " + aID + " " + aSort;
}
}
// Debug stuff.
// gA11yEventDumpID = "eventdump";
// gA11yEventDumpToConsole = true;
function doTests()
{
//gA11yEventDumpID = "eventdump"; // debug stuff
gQueue = new eventQueue();
gQueue.push(new hideNode("hideable", "true"));
gQueue.push(new updateSort("sortable", "ascending"));
gQueue.invoke(); // Will call SimpleTest.finish();
}
@ -67,6 +91,12 @@
Mozilla Bug 581096
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=640707"
title="Add event support for aria-sort">
Mozilla Bug 640707
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
@ -75,5 +105,6 @@
<div id="hideable"><div>Hi</div><div>there</div></div>
<div id="sortable" role="columnheader" aria-sort"none">aria-sort</div>
</body>
</html>