dwarvesf / til

Today I Learned. Our knowledge hub. List out what we've learned everyday, organized.
29 stars 1 forks source link

Vài best practice khi hỗ trợ accessibility trong android #48

Open siliconprime-thanhduc opened 5 years ago

siliconprime-thanhduc commented 5 years ago

Trong Google IO 2019 đầu năm nay, có 1 chủ đề được thuyết trình đó là Mobile Accessibility: making sure everyone can use what you create.

Thành và @phucledien thấy đây là 1 chủ đề đáng lưu ý mà hiện tại đa số những bạn lập trình viên ko để ý tới. Sau khi research về topic này, thì những lý do vì sao nên support Accessibility sẽ ko đề cập đến trong bài viết này. Xin chỉ note lại những best practice để khi lập trình chúng ta sẽ follow để có thể improve được app cho những người dùng bị khiếm khuyết có thể sử dụng.

*Bật tính năng TalkBack (tính năng để support accessibility) : Có thể xem hướng dẫn tại đây https://codelabs.developers.google.com/codelabs/basic-android-accessibility/index.html#2 Hướng dẫn sử dụng app khi đã enable TalkBack: https://codelabs.developers.google.com/codelabs/basic-android-accessibility/index.html#3

Content Labeling Tip for developer:

Here are some tips that can enhance the experience for TalkBack users:

Grouping Content

The best practices for grouping and ordering elements in an accessible manner can be summarized like this:

Using a Live Region

Carefully consider when using live regions, as announcements for frequently changing views can be disruptive and annoying. Live regions can easily be overused, especially when you're just starting out with accessibility. Live regions are the exception, not the rule.

Custom Views

Turning off TalkBack

Hint: scrolling with two fingers in TalkBack is equivalent to scrolling with one finger when not using TalkBack.

Making Touch Targets Large

Ensuring Adequate Color Contrast

Accessibility Scanner

Reference: https://developer.android.com/guide/topics/ui/accessibility https://codelabs.developers.google.com/codelabs/basic-android-accessibility/index.html#0