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

Add sub roles to MacOS adapter #480

Merged

Conversation

HolgerGottChristensen
Copy link
Contributor

@HolgerGottChristensen HolgerGottChristensen commented Oct 31, 2024

Adds initial support for accessibility sub roles to the MacOS adapter, allowing AccessKit to expose Toggle buttons, Switch and more, correctly to VoiceOver.

Needed clarifications:

Fixes #477

Fixes #372

@DataTriny
Copy link
Member

DataTriny commented Oct 31, 2024

Does AccessKit handle math, and all the math roles from chromium?

We do have these roles and I think they are all named exactly like Chromium's. Please add them if possible.

How is search box represented?

By giving Role::SearchInput to a node.

How is secure textfields represented?

By giving Role::PasswordInput to a node.

@HolgerGottChristensen
Copy link
Contributor Author

I dont see any of the math roles in the list of roles: https://github.com/AccessKit/accesskit/blob/main/common/src/lib.rs#L55

Are they defined somewhere else?

@DataTriny
Copy link
Member

Woops, sorry. We must have removed them at some point. Please do the same.

@DataTriny
Copy link
Member

With the changes from this PR, tabs are correctly announced as tabs by VoiceOver. This can be tested by running the gallery example from my fork of Slint. I've updated the PR description accordingly.

@mwcampbell
Copy link
Contributor

I don't recall dropping math roles. It's more likely that when I copied the roles from Chromium in July 2021, those roles didn't exist yet.

@HolgerGottChristensen
Copy link
Contributor Author

I don't recall dropping math roles. It's more likely that when I copied the roles from Chromium in July 2021, those roles didn't exist yet.

Yes, they were added in October 2021, so right after you copied the roles :)
chromium/chromium@6ee9585

platforms/macos/src/node.rs Outdated Show resolved Hide resolved
Copy link
Member

@DataTriny DataTriny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DataTriny DataTriny merged commit 40ad828 into AccessKit:main Nov 1, 2024
9 checks passed
@github-actions github-actions bot mentioned this pull request Nov 1, 2024
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

Successfully merging this pull request may close these issues.

MacOS Adapter - Sub roles macOS: Tabs are currently announced as radio buttons
3 participants