Accessibility support failing for desktop snaps on recent distro releases

The desktop-legacy interface is supposed to give a snap permission to talk to the at-spi service, which in turn allows it to be controlled by accessibility tools like screen readers. This became more obvious in Ubuntu 21.10 where Firefox has been migrated to a snap. It would affect all snaps that support a11y, and likely affects more distro releases.

The problem seems to have originated with this change to at-spi upstream, which was included in version 2.39.1:

This changed the socket location of at-spi’s private D-Bus daemon from the abstract namespace to a regular namespace unix socket. This poses a few difficulties:

  1. The socket is now located under /tmp, which is inaccessible due to snapd’s private tmp directory feature.
  2. The socket is located directly under /tmp rather than in a sub-directory, which makes the mount tricks we used for exposing the non-abstract X11 sockets difficult.

I think the solution to this will probably require some changes upstream and some changes to snapd. My preferred fixes would be:

  1. Patch at-spi2-core to move the D-Bus socket. My preference would be to place the bus in a sub-directory of $XDG_RUNTIME_DIR. Maybe even with a fixed name, but that is not a hard requirement.
  2. Patch snapd’s desktop-legacy interface to allow snaps to connect to the socket in the new location.

These changes should be transparent to applications, as applications discover the accessibility bus by calling the org.a11y.Bus.GetAddress method on the D-Bus session bus.


Here’s an upstream bug report for this issue:

I suspect we’ll end up implementing the fix. My hope is that it will be accepted upstream so the fix is not Ubuntu only.

Upstream changed the location now in and the patch has been cherrypicked to Ubuntu, next snapd needs to be updated now

And the update to the desktop-legacy interface landed in snapd, I expect it will be available in the upcoming 2.55 release.