Conversation
…cessibility module for iOS
…t Android accessibility support
- Added announce() and focus() methods for Android - Registered module in the kernel for both platforms - Fixed iOS JSValue unwrapping race conditions
…mmediate event handling
|
Nice PR 👍 It's adding/changing a lot so it will take some time to get it fully reviewed and tested. One thing you could change already: check how the comments are done for other methods e.g. in TiUIView and use the same structure. |
…ws across Android and iOS
|
Looking at the changes and cross-platform coverage, this could better be a module:
|
|
Thanks for the feedback @m1ga, @hansemannn I can work on implementing this as a separate module, but I wanted to confirm a few things first.
|
Here's the updated PR description with the latest commit details added:
This PR adds full cross-platform accessibility support to the Titanium SDK, introducing new properties on
Ti.UI.View, a new cross-platformTi.Accessibilitymodule, and afontScaleChangedevent onTi.App.Changes
1. Cross-Platform Accessibility Properties on
Ti.UI.ViewaccessibilityRole— semantic role (e.g., button, header, link).accessibilityState— current state (e.g., disabled, checked).accessibilityActions— custom accessibility actions.accessibilityDisableLongPress— suppress "Double tap and hold" announcement.accessibilityDisableClick— suppress "Double tap to activate" announcement (Android).accessibilityViewIsModal— marks a view as a modal for accessibility, hiding sibling content from screen readers (VoiceOver/TalkBack).2.
Ti.AccessibilityModule (iOS & Android)announce(message): Programmatically reads out a string via VoiceOver (iOS) or TalkBack (Android).focus(viewProxy): Immediately routes focus to a specific element without causing bounce/race conditions (fixed by removing synthetic delays and input-focus emulation).focusdirectly with UI views.3.
fontScaleChangedEvent onTi.AppUIContentSizeCategoryDidChangeNotification, fires with{ category }(e.g.,"UICTContentSizeCategoryXL").Configuration.fontScaleviaConfigurationChangedListener, fires with{ value }(e.g.,1.3).Files Changed
TiC.java,TiViewProxy.java,TiUIView.java,titanium.jsAppModule.java,AccessibilityModule.javaTiUIView.h,TiUIView.m,TiViewProxy.m,TiWindowProxy.m,AppModule.m,KrollModule.mAccessibilityModule.h,AccessibilityModule.mproject.pbxproj,project.xcconfig,build.gradleAccessibility.yml,App.yml,View.ymlti.app.test.js,ti.ui.accessibility.test.jsTesting
clang-formatpassesoxlintpasses