mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1271946 - no alert, menupopup_start events from created subtree, partial backout of bug 1262420, r=marcoz
This commit is contained in:
parent
83b2cc47a0
commit
59bfc9cc59
@ -170,6 +170,17 @@ DocAccessible::CreateSubtree(Accessible* aChild)
|
||||
Accessible* focusedAcc = nullptr;
|
||||
CacheChildrenInSubtree(aChild, &focusedAcc);
|
||||
|
||||
// Fire events for ARIA elements.
|
||||
if (aChild->HasARIARole()) {
|
||||
roles::Role role = aChild->ARIARole();
|
||||
if (role == roles::MENUPOPUP) {
|
||||
FireDelayedEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_START, aChild);
|
||||
}
|
||||
else if (role == roles::ALERT) {
|
||||
FireDelayedEvent(nsIAccessibleEvent::EVENT_ALERT, aChild);
|
||||
}
|
||||
}
|
||||
|
||||
// XXX: do we really want to send focus to focused DOM node not taking into
|
||||
// account active item?
|
||||
if (focusedAcc) {
|
||||
|
@ -2181,19 +2181,9 @@ DocAccessible::CacheChildrenInSubtree(Accessible* aRoot,
|
||||
return;
|
||||
}
|
||||
|
||||
roles::Role role = aRoot->ARIARole();
|
||||
if (role == roles::MENUPOPUP) {
|
||||
FireDelayedEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_START, aRoot);
|
||||
return;
|
||||
}
|
||||
|
||||
if (role == roles::ALERT) {
|
||||
FireDelayedEvent(nsIAccessibleEvent::EVENT_ALERT, aRoot);
|
||||
return;
|
||||
}
|
||||
|
||||
// XXX: we should delay document load complete event if the ARIA document
|
||||
// has aria-busy.
|
||||
roles::Role role = aRoot->ARIARole();
|
||||
if (!aRoot->IsDoc() && (role == roles::DIALOG || role == roles::DOCUMENT)) {
|
||||
FireDelayedEvent(nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE, aRoot);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user