-
Notifications
You must be signed in to change notification settings - Fork 15k
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
fix: AXManualAccessibility
showing failure
#38102
Conversation
Thanks for looking into this. You know, I didn't even think to check whether it was having the desired effect on the rest of the accessibility tree - I just saw the error and assumed it was actually failing. Does this also fix reading the attribute's value, or getting the list of attributes to see if it exists? |
@codebytere this code aligns with upstream. Can we check if they have a similar change and if not try it there first? |
@MarshallOfSound I think you're thinking about the other attribute, |
can you explain this a little more? What are you specifically trying to do (beyond set the attribute using the above sample code) that is failing? |
Release Notes Persisted
|
I was unable to backport this PR to "25-x-y" cleanly; |
I was unable to backport this PR to "23-x-y" cleanly; |
I was unable to backport this PR to "24-x-y" cleanly; |
I didn't think about this when I was writing the sample code, but: Right now, the array you get by calling Also, in AppleScript, you can't even take the "try to set it and ignore the error" approach because of this: tell application "System Events"
tell application process "Electron" -- or whatever Electron-based app
set value of attribute "AXManualAccessibility" to true
-- System Events got an error: Can’t set attribute "AXManualAccessibility" of application process "Electron" to true.
end tell
end tell In System Events, each attribute looks like its own 'object', and since that one "doesn't exist" according to Reading the current value of WebKit, Chromium, and Firefox all seem to implement non-standard AX attributes (e.g.
I haven't found any equivalent to these in the current, non-deprecated Footnotes
|
@codebytere Sorry it took so long to get back to you. Not sure if my reply made it to you or not, since the PR was merged/closed by the time I submitted it. |
/trop run backport-to 25-x-y,24-x-y,23-x-y |
The backport process for this PR has been manually initiated - sending your PR to |
The backport process for this PR has been manually initiated - sending your PR to |
The backport process for this PR has been manually initiated - sending your PR to |
I was unable to backport this PR to "25-x-y" cleanly; |
I was unable to backport this PR to "24-x-y" cleanly; |
I was unable to backport this PR to "23-x-y" cleanly; |
@codebytere has manually backported this PR to "25-x-y", please check out #38146 |
@codebytere has manually backported this PR to "24-x-y", please check out #38147 |
@codebytere has manually backported this PR to "23-x-y", please check out #38151 |
Description of Change
Closes #37465.
Fixes an issue where using Swift etc to enable various a11y features within Electron using the
AXManualAccessibility
attribute would appear to fail. This was happening because we were always calling[super accessibilitySetValue:value forAttribute:attribute]
in our override, and the custom attribute would always fail when that superclass function was shown. After this fix, the attribute correctly reflects success, with no failure and theaccessibility-support-changed
event correctly emitted onapp
.I also took the opportunity to update the documentation a little to reflect multiple approaches.
Tested using the Swift REPL and the following code:
Checklist
npm test
passesRelease Notes
Notes: Fixed an perceived failure when when using Accessibility attribute
AXManualAccessibility
to enable a11y features in Electron.