Require registration of ATs on the accessibility bus
The shared bus topology mandates that every toolkit start shouting into the void, even if there's nothing on the other side. This ends up being expensive, as toolkits must register accessible objects, update states, and emit signals even if nothing is going to use them. We cannot enumerate the list of clients on the accessibility bus, because we have no mechanism to determine if a peer is an application or an actual assistive technology.
Ideally, ATs should register themselves on the Registry, and the Registry should provide an API to query the presence of ATs on the bus; if no ATs are available, toolkits could delay the initialization of the accessibility data. If an AT registers on the bus, the Registry should emit a signal, causing the toolkit to present itself and submit its current state.
A rough sketch of the API:
<?xml version="1.0" encoding="UTF-8"?>
<node>
<interface name="org.a11y.atspi.Registry">
<!--
AddAT:
@identifier: a unique identifier for the assistive technology
Registers a new assistive technology for the given identifier.
If an assistive technology with the same identifier has already
been registered, this method raises a D-Bus error.
The registry will associate the sender id of this method with
the identifier, and will automatically remove the identifier
once the sender disappears from the bus.
-->
<method name="AddAT">
<arg direction="in" name="identifier" type="s"/>
</method>
<!--
ListATs:
Lists all assistive technologies registered.
Returns: an array of identifiers
-->
<method name="ListATs">
<arg direction="out" name="identifiers" type="as"/>
</method>
<!--
ATChanged:
@identifiers: a list of identifiers
This signal is emitted every time the list of assistive technologies changes.
-->
<signal name="ATChanged">
<arg name="identifiers" type="as"/>
</signal>
</interface>
</node>