primary-context-has-title
Mobile validation
The primary context is the screen at the top of the view hierarchy, such as an activity. Give each of these screens a title that describes it, so TalkBack can announce the screen's name when it opens. Without a title, or with a generic one such as the app's name, users may not know which screen they have landed on, lose their place after navigating, and struggle to tell similar screens apart.
On Android, set the title of each activity with android:label in the manifest, with setTitle(), or on the toolbar.
Note: This validation checks Android apps built with XML views only, so there are no Jetpack Compose, iOS, or cross-platform examples. Screens built with Jetpack Compose still need a title: in apps where one activity hosts many screens, give each screen a pane title.
Pass Patterns
Android
XML Views
The activity has its own title in the manifest, with android:label.
<activity
android:name=".CheckoutActivity"
android:label="Checkout" />The activity sets its title in code, with setTitle() or on its toolbar.
class CheckoutActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_checkout)
setTitle("Checkout")
// Or, when the screen uses a toolbar:
// toolbar.title = "Checkout"
}
}Fail Patterns
Android
XML Views
The activity has no android:label, so it inherits the app's label, and the screen is announced with the app's name instead of its own.
<activity android:name=".CheckoutActivity" />The activity sets an empty title, so the screen has no name.
class CheckoutActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_checkout)
setTitle("")
}
}Try It Yourself
Using a screen reader
New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers
- Turn on TalkBack.
- Navigate to a new top-level screen in the app.
- Listen to what TalkBack announces when the screen opens.
Expected results: TalkBack announces a title that describes the screen, for example “Checkout”.
Actual results: TalkBack announces nothing, or only the app's name, when the screen opens.
Tip: A visible heading at the top of the screen also helps users orient themselves. To check it, choose Headings in TalkBack's reading controls, and swipe down to move to the first heading.
FAQ
How does this issue relate to 2.4.2 Page Titled?
SC 2.4.2 requires titles that describe the topic or purpose of each page. In a native app, a top-level screen is the equivalent of a page, and EN 301 549 clause 11.2.4.2 requires non-web software to provide titles that describe each window or screen. Without a title, assistive technologies cannot announce which screen the user is on, so the criterion is not met.
Why is this issue marked as Serious?
The screen title is what assistive technologies announce when a screen opens. Without it, users lose their orientation at the moment they arrive, and every screen without a title adds effort and errors when moving through the app, so it is rated serious.
Standards and Regulations
| Standard | Success Criterion | Reference |
|---|---|---|
| WCAG 2.2 | 2.4.2 Page Titled (A) | Web pages have titles that describe topic or purpose. |
| EN 301 549 | 11.2.4.2 Page Titled | Same as the WCAG text. |