Screen Title

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard
Not for use with personal data

WCAG 2.0 - 2.4.2 Moderate Impact - Moderate

Every screen within an application should provide a title to be announced by assistive technology.

Impact

Screen titles allow users with visual, cognitive and motor disabilities and limited short-term memory to determine where they are in the application, identify content on a screen by its title and navigate between screens in cases where a user's mode of operation depends on audio.

Confirmation

  1. Go to a new screen in the app
  2. One of the following will happen:
    • Inaccessible: VoiceOver will not announce a screen title
    • Accessible: VoiceOver will announce the screen title

How to Fix

This issue occurs when a screen is not given a title.

UIKit

In code:

Find the ViewController that is failing the rule, and set the Navigation Controller's title property.

navigationController?.title = "Screen Title Here"

Alternatively, you can set the title property on the ViewController directly.

title = "Screen Title Here"

SwiftUI

Add a .navigationTitle view modifier to the end of the last element within the view's body property.

 var body: some View {
        VStack {
            Text("Below is a stepper in SwiftUI")
            StepperView()
        }.navigationTitle("Screen Title")
    }

React Native

Ensure each Stack.Screen component has a descriptive name. If needed, add options={{title: 'New Screen Title'}} to define a better screen title.

<Stack.Screen
    name="ScreenTitleExample"
    component={ScreenTitleExample}
    options={{title: 'Screen Title'}}
/>

Custom Navigation Bars

What we found in applications built with React Native is that for a truly accessible experience, the navigation header must be set with <Stack.Navigator> with options of title. A custom navigation bar has no way of being programmatically coded to indicate it is a proper navigation element and not just a regular view. This alters how assistive technology announces and interacts with the element. Note that setting a header attribute, as often recommended, does not satisfy the criteria for Screen Title.