android-view-accessibility-techniques icon indicating copy to clipboard operation
android-view-accessibility-techniques copied to clipboard

Android sample code demonstrating a variety of accessibility best practices for View-based UIs.

android-view-accessibility-techniques

Demonstrates a variety of accessibility best practices for Android View-based UIs, as well as the problems they can address. Using the app will demonstrate the impact of accessibility best practices, and reviewing the app project source code will help you learn how to apply those techniques in working code.

See android-view-accessibility-techniques Architecture for details of the app architecture and the project's file structure.

Since some of the code demonstrates the effect of inaccessible coding practices, the app itself does not fully conform to required accessibility guidelines.

Topics

  • Accessibility Basics
    • [x] Text alternatives
    • [x] Input field labels
    • [x] Focusable, clickable controls
    • [x] Text resizing and reflow
    • [x] Minimum touch target size
    • [x] Device orientation
    • [x] Dark theme
  • Grouping and Ordering
    • [x] Tap target grouping
    • [x] Content grouping
    • [x] Content group replacement
    • [x] Heading semantics
    • [x] List semantics
    • [x] Accessibility reading order
    • [x] Keyboard and accessibility focus order
    • [x] Arrow key focus order
  • Dynamic Behaviors
    • [x] UX change announcements
    • [x] Input error announcements
    • [x] Animation control
    • [x] Keyboard types
    • [x] Accessibility action labels
    • [x] Custom state descriptions
    • [x] Custom accessibility actions
    • [x] Custom focus indicators
  • Specific Component Types
    • [x] Accordion controls
    • [x] Autocomplete input controls
    • [x] Autofill input fields
    • [x] Dropdown selection menus
    • [x] Links inline with text
    • [x] RatingBar controls
    • [x] Text language identification
  • Other
    • [x] Espresso Accessibility Checks automated testing
      • See also app/build.gradle, AccessibilityChecksTestRunner.kt, and InputFieldLabelsTests.kt.

Screenshots

android-view-accessibility-techniques Home screen collapsed to show only the 4 top-level accessibility topic headings android-view-accessibility-techniques Home screen expanded to show 29 accessibility technique topics

Contributor Guide

  1. Before contributing to this CVS Health sponsored project, you will need to sign the associated Contributor License Agreement.
  2. See contributing page.

License

android-view-accessibility-techniques is licensed under under the Apache License, Version 2.0. See LICENSE file for more information.

Copyright 2023-2024 CVS Health and/or one of its affiliates

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations under the License.