From 1c400ec41ccfea7e1b33142279746235c995bd56 Mon Sep 17 00:00:00 2001 From: Thomas Wisniewski Date: Tue, 7 May 2024 01:04:21 +0000 Subject: [PATCH] Bug 1893376 - have XPCOM GetAccessibleFor return GetAccessibleEvenIfNotInMap when getting an Accessible for a DOM node; r=Jamie This allows tests to get an Accessible for an HTML area element, since area elements are special and are not in the DocAccessible node map. Differential Revision: https://phabricator.services.mozilla.com/D209614 --- accessible/xpcom/xpcAccessibilityService.cpp | 3 ++- testing/web-platform/meta/html-aam/fragile/area-role.html.ini | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 testing/web-platform/meta/html-aam/fragile/area-role.html.ini diff --git a/accessible/xpcom/xpcAccessibilityService.cpp b/accessible/xpcom/xpcAccessibilityService.cpp index a7b70b6f3396..f6692bffbb02 100644 --- a/accessible/xpcom/xpcAccessibilityService.cpp +++ b/accessible/xpcom/xpcAccessibilityService.cpp @@ -123,7 +123,8 @@ xpcAccessibilityService::GetAccessibleFor(nsINode* aNode, DocAccessible* document = accService->GetDocAccessible(aNode->OwnerDoc()); if (document) { - NS_IF_ADDREF(*aAccessible = ToXPC(document->GetAccessible(aNode))); + NS_IF_ADDREF(*aAccessible = + ToXPC(document->GetAccessibleEvenIfNotInMap(aNode))); } return NS_OK; diff --git a/testing/web-platform/meta/html-aam/fragile/area-role.html.ini b/testing/web-platform/meta/html-aam/fragile/area-role.html.ini deleted file mode 100644 index 8f658517d765..000000000000 --- a/testing/web-platform/meta/html-aam/fragile/area-role.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[area-role.html] - [el-area] - expected: FAIL