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, roles, values, and states

Labels, roles, values, and states - Android Tutorial

From the course: Android App Development: Accessibility

Start my 1-month free trial

Labels, roles, values, and states

- [Instructor] Visual components can be textually described using four attributes. Label, Role, Value, and State. To better illustrate this, let's try to describe this layout. We can see that we have text, such as Feed, Friends, Messages, Invitations, and Manage, but those are only the labels. How do I know what Feed is, or what Friends is? Is it just the text or can I also click it? Is this part of a group or is it a separate text? By adding more descriptions to each element, I can know understand what each component is. If I focus on Friends, for example, I would know that this is a tab and it is the second tab from the list of three, and it is currently selected. Visually, that's exactly what I see. The same applies for the two buttons below. Invitations and Manage are just stand-alone buttons. So for the TabLayout, Friends is the Label, Tab is the Role of this component. "2 of 3" is the Value of this component, and Selected is the State. For the Invitation Button, Invitations is…

Contents