Providers should not be concerned with localization
Except when dealing with application specific content, AT-SPI providers should not have to deal with localization for strings already known by the core AT-SPI library.
Let's focus on role names. Providers are expected to implement GetRoleName
and GetLocalizedRoleName
from the Accessible
interface. It's unnecessary since the set of possible values are already known by libatspi. I'd suggest moving the logic from ATK to atspi.
The only downside to this approach that come to my mind is: if an AT uses a different locale than the app, then roles will be reported using the AT's locale. I think this deviates from the current behavior, although it's probably broken since roles are reported in English on my French system. Is this really an issue? Some screen readers behave this way.
To preserve the current behavior, I think the locale to use should be retrieved from the Accessible
's Locale
property.
Since ROLE_EXTENDED
is deprecated, I think we should deprecate GetRoleName
and GetLocalizedRoleName
as well.