Skip to content

[wpe-2.46] Avoid premature atspi interactions during initialization#1617

Merged
magomez merged 1 commit intoWebPlatformForEmbedded:wpe-2.46from
filipe-norte-red:wpe-2.46-fix-incomplete-atspi-init
Feb 12, 2026
Merged

[wpe-2.46] Avoid premature atspi interactions during initialization#1617
magomez merged 1 commit intoWebPlatformForEmbedded:wpe-2.46from
filipe-norte-red:wpe-2.46-fix-incomplete-atspi-init

Conversation

@filipe-norte-red
Copy link
Copy Markdown

Currently, when the system is starting up, it will perform the atspi related initializations to allow clients to connect. When a client connects, the accessibility object cache is enabled via a call to AXObjectCache::enableAccessibility(). On certain platforms, a client may connect only if accesibility support is enabled via a user configurable menu option (e.g. to enable/disable voice guidance) to minimize unnecessary D-Bus traffic. Consequently, the accessibility object cache may not be enabled when the page loads and no accessibility related information will be gathered.

If the user enables accessibility without effectively leaving the browser (e.g. remote control shortcut), accessibility will not be operational on the currently loaded page. A page reload would be required or changes to the DOM tree, which may not happen depending on the app design (at least while on the page the user is navigating on).

To overcome this, the accessibility cache may be enabled by default (via custom patch). This leads to a race condition between the atspi init sequence waiting to take ownership of the bus name, and the page load causing state changes that lead to attempts to register objects:

AccessibilityAtspi::stateChanged() ->
AccessibilityObjectAtspi::path () ->
AccessibilityObjectAtspi::registerObject() ->
AccessibilityAtspi::registerObject() ->
RELEASE_ASSERT(!m_isConnecting);

To overcome this, we'll consider the connection as established to allow method calls to complete only after acquiring the bus name.

Currently, when the system is starting up, it will perform the atspi
related initializations to allow clients to connect. When a client
connects, the accessibility object cache is enabled via a call to
AXObjectCache::enableAccessibility(). On certain platforms, a client may
connect only if accesibility support is enabled via a user configurable
menu option (e.g. to enable/disable voice guidance) to minimize
unnecessary D-Bus traffic. Consequently, the accessibility object cache
may not be enabled when the page loads and no accessibility related
information will be gathered.

If the user enables accessibility without effectively leaving the
browser (e.g. remote control shortcut), accessibility will not be
operational on the currently loaded page. A page reload would be
required or changes to the DOM tree, which may not happen depending on
the app design (at least while on the page the user is navigating on).

To overcome this, the accessibility cache may be enabled by default (via
custom patch). This leads to a race condition between the atspi init
sequence waiting to take ownership of the bus name, and the page load
causing state changes that lead to attempts to register objects:

AccessibilityAtspi::stateChanged() ->
    AccessibilityObjectAtspi::path () ->
        AccessibilityObjectAtspi::registerObject() ->
            AccessibilityAtspi::registerObject() ->
                RELEASE_ASSERT(!m_isConnecting);

To overcome this, we'll consider the connection as established to allow
method calls to complete only after acquiring the bus name.

Signed-off-by: Filipe Norte <filipe_norte@comcast.com>
@magomez magomez merged commit 26f7e35 into WebPlatformForEmbedded:wpe-2.46 Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants