Skip to main content
Logo Appt Light

Success Criterion 1.3.5 - Level AA

Identify Input Purpose

Ensure it is clear what information is expected from users inside input fields. Set the correct input type to allow auto-completion, e.g. for e-mail addresses. This is faster for everyone and reduces errors for users with disabilities.

Impact

  • Give clear instructions and ensure that fields can be filled in automatically by assistive technologies.

  • Clear instructions are very important for people with cognitive disabilities.

  • For people with a motor disability, filling in forms automatically is a lot easier.

  • Clear instructions and auto-completion makes it easier for everyone to fill in information.

Check

Is the purpose of the input field made clear?

This can be tested visually, no assistive technologies are needed.

Solution

Set content type

On Android, you can set a content type by using the android:optimizeForAutoFill property.

The following values are defined:

Example of using autofillHints:

<EditText
    android:autofillHints="emailAddress" />

Set keyboard type

On Android, you can set a keyboard type by using the android:inputType property. You can combine values with each other.

The following constants are defined:

  • date: for entering a date

  • datetime: for entering a date and time

  • none: to disable input

  • number: for entering a number

  • numberDecimal: for entering decimal numbers

  • numberPassword: for entering a numeric password

  • numberSigned: for entering a positive or negative number

  • phone: for entering a telephone number

  • text: for entering normal text

  • textAutoComplete: to enable automatic completion

  • textAutoCorrect: to enable automatic correction

  • textCapCharacters: to automatically convert characters to uppercase

  • textCapSentences: to automatically capitalize sentences

  • textCapWords: to automatically capitalize words

  • textEmailAddress: for entering an email address

  • textEmailSubject: for entering the subject of an email

  • textFilter: for entering text to filter with

  • textImeMultiLine: to force entering multiple lines of text

  • textLongMessage: for entering a long message

  • textMultiLine: for entering multiple lines of text

  • textNoSuggestions: to disable suggestions

  • textPassword: for entering a password

  • textPersonName: for entering a name

  • textPhonetic: for entering phonetic text

  • textPostalAddress: for entering a postal address

  • textShortMessage: for entering a short message

  • textUri: for entering a URL

  • textVisiblePassword: for entering a visible password

  • textWebEditText: for entering text in a web form

  • textWebEmailAddress: for entering an email address in a web form

  • textWebPassword: for entering a password in a web form

  • time: for entering a time

Example of using inputType:

<EditText
    android:inputType="text|textMultiLine|textCapSentences" />

Resources

Feedback?

Let us know!