Bug 1867811 - Expose EXPANDED state for element with popovertarget. r=Jamie

Differential Revision: https://phabricator.services.mozilla.com/D196541
This commit is contained in:
Ziran Sun
2023-12-19 17:30:56 +00:00
parent 24a78c4744
commit 2a15361c10
5 changed files with 78 additions and 2 deletions

View File

@@ -716,6 +716,19 @@ void nsAccessibilityService::TableLayoutGuessMaybeChanged(
}
}
void nsAccessibilityService::PopovertargetMaybeChanged(PresShell* aPresShell,
nsIContent* aContent) {
DocAccessible* document = GetDocAccessible(aPresShell);
if (!document) {
return;
}
if (LocalAccessible* acc = document->GetAccessible(aContent)) {
RefPtr<AccEvent> expandedChangeEvent =
new AccStateChangeEvent(acc, states::EXPANDED);
document->FireDelayedEvent(expandedChangeEvent);
}
}
void nsAccessibilityService::ComboboxOptionMaybeChanged(
PresShell* aPresShell, nsIContent* aMutatingNode) {
DocAccessible* document = GetDocAccessible(aPresShell);