diff --git a/content/test/data/accessibility/event/navigation-api-expected-win.txt b/content/test/data/accessibility/event/navigation-api-expected-win.txt index df28146fa26290..abbc922bd7bc0c 100644 --- a/content/test/data/accessibility/event/navigation-api-expected-win.txt +++ b/content/test/data/accessibility/event/navigation-api-expected-win.txt @@ -1,4 +1,4 @@ -EVENT_OBJECT_STATECHANGE on <#document> role=ROLE_SYSTEM_DOCUMENT name="Starting title" value~=[doc-url] FOCUSED,BUSY,FOCUSABLE +EVENT_OBJECT_STATECHANGE on <#document> role=ROLE_SYSTEM_DOCUMENT name="Starting title" value~=[doc-url] FOCUSED,FOCUSABLE === Start Continuation === EVENT_OBJECT_HIDE on

role=ROLE_SYSTEM_GROUPING EVENT_OBJECT_REORDER on

role=ROLE_SYSTEM_GROUPING diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc index 6734c334686465..2f35b803e5d57b 100644 --- a/ui/accessibility/platform/ax_platform_node_win.cc +++ b/ui/accessibility/platform/ax_platform_node_win.cc @@ -7094,6 +7094,10 @@ bool AXPlatformNodeWin::IsNameExposed() const { } } +bool AXPlatformNodeWin::IsPlatformDocumentWithContent() const { + return IsPlatformDocument() && GetChildCount(); +} + bool AXPlatformNodeWin::IsUIAControl() const { // UIA provides multiple "views": raw, content and control. We only want to // populate the content and control views with items that make sense to @@ -7327,8 +7331,14 @@ int AXPlatformNodeWin::MSAAState() const { // Map the ax::mojom::State to MSAA state. Note that some of the states are // not currently handled. - if (GetBoolAttribute(ax::mojom::BoolAttribute::kBusy)) + // TODO(accessibility): https://crbug.com/1292018 + // Exposing the busy state on the root web area means the NVDA user will end + // up without a virtualBuffer until the page fully loads. So if we have + // content, don't expose the busy state. + if (GetBoolAttribute(ax::mojom::BoolAttribute::kBusy) && + !IsPlatformDocumentWithContent()) { msaa_state |= STATE_SYSTEM_BUSY; + } if (HasState(ax::mojom::State::kCollapsed)) msaa_state |= STATE_SYSTEM_COLLAPSED; diff --git a/ui/accessibility/platform/ax_platform_node_win.h b/ui/accessibility/platform/ax_platform_node_win.h index 4a5b964992c12e..c2ac84b19ca9b5 100644 --- a/ui/accessibility/platform/ax_platform_node_win.h +++ b/ui/accessibility/platform/ax_platform_node_win.h @@ -1282,6 +1282,8 @@ class AX_EXPORT __declspec(uuid("26f5641a-246d-457b-a96d-07f3fae6acf2")) int GetAnnotationTypeImpl() const; void AugmentNameWithImageAnnotationIfApplicable(std::wstring* name) const; + bool IsPlatformDocumentWithContent() const; + // Get the value attribute as a Bstr, this means something different depending // on the type of element being queried. (e.g. kColorWell uses kColorValue). static BSTR GetValueAttributeAsBstr(AXPlatformNodeWin* target);