The purpose of this library is to provide a unified way for accessibility features on Android on iOS.
All accessibility methods are available through the Accessibility
class. Additionally, an accessibility
property is added to all classes which inherit from View
, Activity
and Fragment
.
Example:
Providing an accessibility label:
- on Android you would set
contentDescription
- on iOS you would set
accessibilityLabel
With this library you can can use accessibility.label
on Android and iOS. The library calls the native methods.
- View
label
: set the accessibility labelaction
: set the accessibility action to announceelements
: set the order of accessibility elementsfocus()
: moves the accessibility focus to this view
- Activity/Fragment
elements
: set the order of accessibility elementsannounce(message)
: announces the provided message
Minimum supported Android version is 5.0 (API 21)
To run the example project, clone the repo, and open the project in Android Studio.
To start using this library, add these lines to the build.gradle
of your project:
repositories {
jcenter()
}
dependencies {
compile 'nl.appt.accessibility:accessibility:<latest-version>'
}
Note: in the near future the library will be made migrated to Maven Central.
Jan Jaap de Groot, janjaap@appt.nl
Accessibility is available under the MIT license. See the LICENSE file for more info.