In today’s post, I’ll be making you familiar with some amazing features of android app accessibility thanks to Amanda Cline, a proficient android app developer with a brilliant caliber of building simple and complex websites and web applications.
The most common words of wisdom are that an app must be smooth in terms of use, intuitive and user-friendly. However, is that sufficient enough? One fact that most developers and designers often look over is that an app should be accessible and easy to navigate through for everyone. And that includes users with visual or physical disabilities.
And sure, Android offers a lot of accessibility options and features. The sad part is that they are usually neglected during the design and implementation phase. The extent is such that even though accessibility APIs were first introduced in Android 1.6, developers were neither familiar nor interested in them.
The extent of accessibility being an afterthought can be gauged by the fact that it produces only a limited number of results and mentions on Google search and Stack Overflow.
This shouldn’t be the case as implementing accessibility features is actually quite a simple task. Let’s delve deeper into how we accomplish that:
Table of Contents
Adding a text description to UI elements
All good designers are aware of the fact that a well designed interface is self-explanatory and intuitive. Users do not require instructions for performing actions. However, this may not be the case always.
Visually impaired users need audio help and physically impaired ones might need visual cues to navigate even the most simple interfaces. The content descriptions are utilized in this regard. Apart from being the easiest accessibility feature to implement, they are the most useful ones too. They are similar to the comments in a program.
Google suggests that content descriptions must be mainly used for image view, image button and checkbox elements as this is where they are most needed.
These descriptions can be added in two ways, via XML layouts or traditional Java methods.
The following allows you to add descriptions to images in two ways:
<ImageView android:id="@+id/new_image" ... android:contentdescription="@string/image_desc" />
The @string has to be declared in strings.xml file in the following fashion:
<string name="image_desc">Simple description of what the image represents</string>
In case of edit text fields use the following lines to make the user understand as to what they should type.
android:hint = "Name Field"
If the interface elements in your app are changing states, like a toggle button or a checkbox, you must ensure that the content description, depending on the state, changes dynamically.
In such a case you must use the setContentDescription() method.
label.setContentDescription(“Toggle is set to: ” + (ToggleButton).isChecked())
If it’s not necessary, do not add description otherwise you may end up annoying users.
In case you think that the element is self explanatory or does not have a real function, like an app icon maybe, then use:
android:contentdescription="@null"
Navigation without using touchscreen
This feature is also called “Focus navigation” and allows the user to use a particular application using digital controllers, without the need for a touchscreen. It is imperative that your Android application supports these mechanisms for navigation.
One must make sure that each input element, can be focussed and is clickable using directional buttons. Also, keep in mind that you must visually indicate the element that the user is focussing on, by having it highlighted.
By default, all control elements in Android have this feature enabled. However, if you have created your own elements, you must make them come “in-focus” using the setFocusable (true) method or the android:focusable attribute:
<EditText ... android:focusable = "true" />
Android’s algorithms can find the nearest focusable element, helping users navigate the interface intuitively with the directional controller. In case you must override this feature, you can use the XML attributes below: android:nextFocusDown, android:nextFocusLeft, android:nextFocusRight, android:nextFocusUp The code below will further shed some light into their usage:
<EditText android:id = "@+id/upper_text_field" … ... android:nextFocusDown = "@+id/lower_text_field" />
Building your own accessibility service:
The accessibility service carries out communication with the user, on behalf of the application. Moreover, it provides navigational feedback such as : text to speech, visual cues etc.
Again, by default, Android by default provides some really cool services such as TalkBack and Explore by touch. This comes off as immense help to users who find it difficult to interact with the device normally owing to physical disabilities or situational ones : ex driving, exercising etc.
The best part is that as a developer you can build your own accessibility services for your application and bundle them together or as a standalone app.
Testing for accessibility
Testing is equally important as implementation, sometimes maybe more. One must ensure that they have thoroughly tested their apps after implementing accessibility features. One way to do so is by enabling Talkback and Explore by touch. You must navigate your application using just audio feedback and directional controls. Some noteworthy aspects are:
- Making sure that every control element provides the necessary feedback
- Audio prompts are not repetitive
- They are not longer than required
Also, Android guidelines require you to have every focusable element at least 48dp in length and width.
Additionally, in order to support those users with hearing disabilities, you must accompany all audio feedback with a secondary mechanism such as haptic feedback, visual cues such as pop ups and notifications. In case your application has video playback, you must offer them subtitles or caption support.
Wrapping up
Through this post, we come to know the importance of accessibility and why you must have it in your development timeline.
Also this post guides you on how to implement different features into an Android app. Regardless of how a user interacts with a device, all developers must focus on making their apps accessible by everyone.
Related posts
7 Online Tools To Record Lectures [2023]
The educational environment seems a lot different compared to a few years ago, with technology bringing major changes. Are you as a lecturer or a learner up to date with the apps and software that can make your life a little easier, for example catering…
Should You Take Mobile Security Seriously? Here Is Why
Gone are the days when the biggest security threats only existed on your computer. Most people think that a cell phone can be a safe space for personal, financial as well as confidential data. However, nowadays with the extensive use of cell phones for literally…
The Best Android Apps To Download This Year [2020]
As our mobile phones have become an essential part of our lives in this technologically advanced world of ours, we have found more ways in which we can use them. Some people stick to the traditional methods of calling and texting, while others venture into…
The Best Photo Editing Apps That You Need to Increase Your Instagram Followers
Instagram is probably the most used social media network nowadays. For some people, it’s just a simple a place to share photos and try to impress the other with the “good life” they have while some others have discovered the power of Instagram and run…
Comparison Of Smart Watches – Apple Watch 8 vs Google Pixel Watch
Since the introduction of smartwatches in the market, people have started to rely more on them because of their convenience. You can use smartwatches to receive notifications, make and receive calls, and access various apps. Smartwatches are not just about looking at the time; they…
Why You Should Use a Personal VPN on a Daily Basis
Personal VPN is one of those technologies which is gaining more and more popularity and importance from day to day. Generally, VPN (Virtual Private Network) was designed to get a secure connection for business purposes mainly. Now, the role of VPNs has changed a lot….
Best Instagram Usernames For Boys and Girls To Get More Followers in 2019 (Updated)
If you are an Instagram user, you have to agree that there is nothing as cool as a catchy name. The importance of a good and unique Instagram name is something that can’t be ignored. The username determines who follows you, the comments that are…
How IoT is Influencing App Development
As you leave your office for the day, you tap an app on your phone and start your car. Another app allows you to turn on lights at your house, maybe even get dinner started. Welcome to IoT, the Internet of Things, in which an…