One of our goals as Android developers should always be to make our our apps as usable as possible. That includes making our apps accessible for users with disabilities or other impairments that require them to use accessibility features such as screen readers to interact with our apps.
As I’ve started playing with Jetpack Compose I’ve been curious about how Compose handles providing information to accessibility services. In this article we are going to dive into how Jetpack Compose interacts with TalkBack. How do we provide content descriptions for images, or attach state labels to elements like checkboxes? We will answer those questions and more!
This is part two in my two-part series on Jetpack Compose’s semantics APIs. Part one of this series provides an introduction to the semantics framework as a whole.
Continue reading ›Android developers are familiar with accessibility APIs like contentDescription
in the View framework to provide accessibility frameworks like TalkBack additional information about our applications. How do we do this in Compose?
The answer to that lies in the semantics APIs, which support both accessibility services and testing.
This is the first of two articles that explore the semantics framework. Today we will be taking a high level look at what semantics are and why we need them.
Continue reading ›Uncaught exceptions fail JUnit tests, just as we would expect. An uncaught exception in our code will crash the application, so we’d rightfully want uncaught exceptions to fail our unit tests too!
We might also expect that an uncaught exception in an RxJava chain would fail our unit tests. These exceptions cause crashes when they go to the default error handler, so they should fail our tests too, right?
Unfortunately that is not the case.
Continue reading ›Shape is an important component of Material Design, and the Material Design Components library for Android supports shape theming on many of the Views that it offers. I recently found myself struggling to get my bottom sheets to show rounded corners though. Here’s a guide to getting your bottom sheets shaped properly!
View Binding is a fantastic new tool for Android Developers to interact with their layouts. As a refresher, View Binding helps replace findViewById()
calls, KotlinX synthetic view accessors, and Butterknife with a solution that is null-safe, View type-safe, and directly tied to your layout files. View Binding was actually split off from the Databinding plugin, which has been stable and used in production apps for a couple years now.
Many applications use <include>
tags in their layout files and as developers start migrating to View Binding they will need to watch out for conflicting View IDs in their included layouts.