The accessibility becomes an ability to operate or make use of the application through alternate navigation which helps the user to communicate with the application on their behalf.
Let us consider an example, through Google voice search; it is now simple Experiences built a reputation. When you provide your customers with the best experience, they could ever get, they would get back to you very often.
So how does this work when it comes to building an application that serves users? That is what we are going to see in today’s post.
First, let us consider what accessibility is? Accessibility of a service is the ability to operate or utilize any feature or function of the Android application with alternative navigation.
to search any results from Google just through voice command. The voice search has lessened the effort of typing every keyword in the search tab.
A few examples of such accessibility services are;
- Amazon Alexa
- Google voice assistance
- Apple’s Siri
In today’s post, let us consider one of the most used platforms in the world. I hope you have guessed it, yes; it is the Android platform that we are going to explore how to improve accessibility.
The following are the most critical steps that help you increase accessibility within your Android Apps
Let’s get started!!!
Labels are the best and descriptive way of addressing a user on what the button or element performs. You can provide a label in the following ways,
The static elements do not change their appearance in a lifetime; hence, an attribute can be added to the corresponding XML element within the layout resource file.
Dynamic elements are the ones that change their appearance during the activity lifetime; you can set the label in the dynamic logic which changes the element’s appearance.
Let us consider how labeling help in making an app more accessible. The following are the steps that are involved in labeling a UI element.
The attributes and the methods vary according to the element type and can be described as follows,
To label graphical elements like ImageView and the ImageButton, do the following;
The above is an XML code for the static elements and for dynamic elements it can be used as,
For decorative XML attributes like android:content Description use “@null.”
In case, if the app is flexible only for Android 4.1 or more you can use the following,
android:important For Accessibility to “no”
Now let us dive deeper to know what to be built.
- To begin with, you need to build a directory in which you are going to work.
- Once you are done, you need to clone the repo which contains the code; the repo holds the android studio projects. Launch the Android studio.
- Now, import the project using the Import Project option,
- Navigate to the cloned source and select the GlobalActionBarService.
- Use the terminal to change the root directory.
The global_action_bar_service.xml contains the metadata for the service.
The other method of making an app more accessible is Supporting directional navigation. Now let us consider how to support directional navigation.
The D-pad is one easiest way for navigation or to move around your app. The D-pad highly helps people with disabilities and manages the flow of control.
Though the D-pad is more helpful in some places, we can expect a few more advancements to it. This can be done by mentioning which element to focus on.
The following are the steps for all four directions:
So far, we have explored how to improve accessibility. Now let us test the accessibility of the application.
Once you have worked on the changes, you can proceed to test the availability of the features. The foremost thing, you can start testing the D-pad functionality using the emulator.
This can be done in either way,
- D-pad functionality using the emulator
- Arrow keys of your keyboard
The next testing can be processed on the Talkback. As mentioned earlier, the talkback can help users with a disability.
The app is used in the majority of the Android devices and can be downloaded from the Android Play Store. Unfortunately, the app is not added to the emulator; hence, it can be testing using a real device.
You can make use of the app without noticing the screen. Were you able to navigate? Did you identify the elements and understand the purpose of the elements?
At the same time, you need to make sure that your application is perfectly good when the user changes the default font-size. The action with many views that has small UI elements might look poor with huge texts.
Also, check the feedback mechanisms to make sure that they work without noise. The testing accessibility should be based on the outline of the concept which meets the requirements as well.
If the app design holds the suggestions of what accessibility mechanism to be used, testing would be much easier. That would be the prior reason to get accessibility planned and described in prior.
The other process of accessibility includes the design
The design process of your app will make it easier for your user to use the app. The process consists of size, color, and layouts.
Once the testing process is done, look into the accessibility scanner results. Make use of the app to see the history of scans you have taken. You also need to know the Price To Create An App with accessibility coming into the picture.
For example: if you find “consider making the clickable item larger,” you need to consider making changes to the clickable element.
The general recommendation by Google is to make any clickable item at least 48dp size. This is because any element that is too small in size would be challenging to be viewed.
This not just concentrates on the visuals; instead, it can help users who travel on bumpy roads, wearing gloves or users in the bright light. This improvement benefits many.
To solve this, add android:minHeight attribute to the editText. But make sure to fix the height to min 48dp size.
The other warning is color contrast. For example, the warning pops up as follows,
“Consider increasing the item’s text foreground to background contrast ratio”
Users with color blindness, poor vision, or dimmed vision would find it difficult to read text with low color contrast. Based on the area and where it falls, a couple of actions can be performed.
In common the color and the background color are changed in the layout XML file, activity_main.xml. But as per the example, you need to make changes in the styles in styles.xml.
You need to open the file and observe the parent style. The current theme might use a dark theme on the action bar, theme.AppCompat.Light.DarkActionBar. Now replace the parent style with Theme.AppCompat.Light.
The above action will change the action bar from white to black. You can run the scanner to check if the previous warning is gone.
In today’s post, we were able to understand the importance of accessibility. Provided we had a chance to review the ways to improve the accessibility of the Android apps.
The post also included how to test the accessibility of the app and how to make color changes to the test issues on scanning.
So what are you waiting for? Did you miss any of these mentions to make your app more accessible? Get them on track right now.
Have I missed any points, do let me know through your valuable comments. I would be happy to hear it from you.
Biography:- Harikrishna Kundariya, a marketer, developer, IoT, ChatBot & Blockchain savvy, designer, co-founder, Director of eSparkBiz Technologies. A Mobile App Development Company. His 8+ experience enables him to provide digital solutions to new start-ups based on IoT and ChatBot.
Gravatar Mail ID:- firstname.lastname@example.org