Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AT-SPI Accessible is missing get_role_name and get_localized_role_name #241

Open
wash2 opened this issue Apr 19, 2023 · 8 comments
Open

Comments

@wash2
Copy link

wash2 commented Apr 19, 2023

get_localized_role_name is called by accerciser for every node and if it is not implemented, the application and its accessibility tree don't show up at all in accerciser. I've added a simple implementation for each here https://github.com/wash2/accesskit/tree/iced and I'd be happy to make a PR with the changes, but also it might be good to come up with a solution which can localize role names 😅

@DataTriny
Copy link
Member

Indeed, i18n is the reason why I initially skipped these methods as we haven't made a choice here yet.
Accerciser's behaviour is bad IMO though, because in reality ATs will provide the role name most of the time.

@wash2
Copy link
Author

wash2 commented Apr 19, 2023

Ok gotcha!

@DataTriny
Copy link
Member

So I made more tests today and my initial assumption was wrong. Given how GetLocalizedRoleName's documentation was phrased, I thought we could return an empty string to signal that libatspi should use its own translation string instead.

Unfortunately it is not the case currently. I'll see if I can change libatspi's behavior, but don't expect a quick fix.

I have a branch in which I updated to the latest atspi version and added the missing methods, get_localized_role_name simply returning the role name as provided by the atspi crate. With this our example program shows up in accerciser.

Is it worth adding this broken implementation while we wait for a proper fix? @mwcampbell

@DataTriny
Copy link
Member

Progress on the GNOME side can be tracked here: GNOME/at-spi2-core#110.

@DataTriny
Copy link
Member

DataTriny commented May 9, 2023

Underlying AT-SPI issue was closed. Our winit example now shows up on Accerciser when using at-spi2-core master. Once you have cloned the repo, instructions for how to build and install can be found here.

Now of course this mean that it won't work for anyone using the current version. Given the state of AT-SPI and how much it is predicted to change, doing backports on our side will be a nightmare. If compatibility with older GNOME is a feature we want, then this issue is still relevant, otherwise it can be closed.

CC @lunixbochs

@lunixbochs
Copy link
Contributor

lunixbochs commented May 9, 2023 via email

@lunixbochs
Copy link
Contributor

lunixbochs commented Sep 1, 2023

I wouldn't mind having this mitigated, as it currently means anyone not on bleeding edge at-spi2-core (including me) can't use Accerciser from their package manager to test Accesskit apps.

@DataTriny
Copy link
Member

@lunixbochs now that the upstream issue is fixed, if we provide non-localized role names they will replace more useful (localized) values provided by libatspi. Solving your issue would require checking which version of the AT-SPI daemon is running on the system.

We understand that this is a serious issue for testers though, I'll investigate this some more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants