From the course: Android App Development: Accessibility

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Labels for input controls

Labels for input controls - Android Tutorial

From the course: Android App Development: Accessibility

Start my 1-month free trial

Labels for input controls

- [Instructor] In our simple web, we have a few activities that contain input controls. Let's test them using TalkBack. First, open the login activity example. - [Woman] Login button. Double tap to activate. Edit box, login. - [Instructor] Note that for each edit text, the labels are not announced. - [Woman] Edit box. Double tap and hold to long press. Edit box. Double tap to enter text. Double tap and hold to long press. - [Instructor] This is because the label is containing sight of the text input layout which is the parent element. - [Woman] Password. Edit box, email address. - [Instructor] In order to associate the label with the input control, we need to use the label for attribute to bind the views together. Now let's go back to the main activity. - [Woman] Navigate up. Accessibility examples. - [Instructor] And let's open the settings activity. - [Woman] Settings button. Double tap to activate. Settings. - [Instructor] In this example, the checkbox, the switch, and the radio…

Contents