How DingTalk Android Achieved Robust Accessibility for the Visually Impaired
This article details DingTalk's Android accessibility journey—starting in mid‑2017, collaborating with the Shenzhen Information Accessibility Research Association, leveraging TalkBack, implementing contentDescription, focus navigation, custom views and services, and emphasizing thorough testing—to empower millions of visually impaired users in China.
China has about 13 million people with visual impairments, roughly one in every 100 individuals living in darkness daily. With the internet permeating daily life, smart devices give blind users independence for socializing, shopping, news, music, and more, making accessible product experiences crucial for their quality of life.
After completing accessibility support on DingTalk iOS, DingTalk Android began its accessibility overhaul in mid‑June 2017. Over two months of collaboration with the Shenzhen Information Accessibility Research Association—through continuous communication, testing, and iteration—resulted in a highly usable accessibility implementation for Android.
Accessibility Support Overview
Visually impaired users cannot see screen content and rely on screen‑reading software, primarily TalkBack on Android, which provides auditory feedback through speech, vibration, and other cues to convey screen information, touch actions, and possible interactions.
Basic TalkBack gestures include:
Scroll: two‑finger swipe.
Tap: select a view then double‑tap anywhere on the screen.
Long press: select a view then double‑tap and hold.
Swipe left/right: move to previous/next item.
To make a view readable, developers must ensure the view gains focus and that the screen‑reader announces the most appropriate description, informing the user of the current position and possible actions.
Accessibility Event Dispatch
Analyzing the source code reveals the entry point for accessibility events in View.java, where methods such as
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED)and sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED) are invoked.
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED); sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
The events propagate to an AccessibilityService implementation (e.g., TalkBack), which processes the AccessibilityEvent and provides audio feedback. Developers can also extend AccessibilityService to create custom services.
Accessibility Checklist
contentDescription : The simplest and most effective way to describe UI elements; a concise description enables 90% of accessibility coverage.
Focus Navigation : Ensure each interactive element is focusable (android:focusable="true") and define logical focus order using android:nextFocus* attributes when default algorithms are insufficient.
Custom Views : When built‑in events are inadequate (e.g., reporting progress on a slider), create custom views and override accessibility methods.
Custom Accessibility Service : Declare the service in AndroidManifest.xml, configure parameters (event types, package names, window content retrieval), and implement callbacks such as onAccessibilityEvent and onInterrupt. This enables advanced automation like “red‑packet” plugins.
Testing : Accessibility improvements require rigorous testing and regression to avoid issues like NPEs from added contentDescription. Automated tests can use Espresso or Robolectric, and professional accessibility teams can assist.
Special Cases and Considerations
Prefer built‑in Android widgets, which already provide accessibility support; avoid substituting ImageView for CheckBox as it hides state information.
Use hint instead of contentDescription for empty EditText fields to convey input purpose without overriding spoken text.
Group small controls into a ViewGroup with a shared contentDescription to enlarge touch targets and reduce focus clutter.
Update contentDescription when a control’s function changes (e.g., play → pause).
Provide auditory feedback for compound controls like date pickers.
Use announceForAccessibility(CharSequence) to broadcast custom messages (e.g., automatic page turns).
Follow design guidelines for accessibility, such as Material Design's accessibility principles.
DingTalk Android Accessibility Progress
Since the Android accessibility work began in June 2017, DingTalk has achieved good usability, with blind users from Zhejiang Blind School and other organizations already using the app. A dedicated “green channel” collects user feedback for rapid issue resolution. DingTalk continues to advance accessibility across PC and iOS platforms, aiming to normalize accessibility improvements in future iterations.
References
http://www.siaa.org.cn/androidguideline.pdf
http://informationaccessibilityassociation.github.io/androidAccessibility/services.htm
http://www.jianshu.com/p/4cd8c109cdfb
https://github.com/appium/android-apidemos/blob/master/src/io/appium/android/apis/accessibility/ClockBackService.java
https://darkness463.github.io/2017/04/17/accessibility-event
http://informationaccessibilityassociation.github.io/androidAccessibility/checklist.htm
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Developer
Alibaba's official tech channel, featuring all of its technology innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
