Controls that do the same thing should be named the same across pages and portals. Sign-in, search and icon examples.
When a button that does the same thing is called "Search" on one page and "Find" on another, people have to stop and wonder whether it is the same function. WCAG 2.1 success criterion 3.2.4 (Level AA) says that components with the same functionality within a set of web pages are identified consistently. That covers text labels, accessible names, alt text and icons.
Consistent does not mean identical in every case. The label may change with context, for example "Page 4" on one page and "Previous page" on page 5, as long as people can still tell that the function is the same. Components with different functions are not expected to be identified consistently, even if they look alike or use similar labels or icons.
A city that has grown several systems ends up with "Sign in", "Log in", "Resident login" and "My account" for the same function, and a different icon and text alternative for Search on each site. Applications and payments need people to move across these systems quickly. The first fix is a small shared vocabulary of control names that every team uses; the Title II standard (WCAG 2.1 A and AA) has this criterion at Level AA. See also first steps for ways to organize this work.
<!-- permits portal --> <a href="/login">Log in</a>
<!-- library portal --> <a href="/signin">Resident login</a>
<!-- utilities portal --> <a href="/account">My account</a><!-- every portal -->
<a href="/signin">Sign in</a><!-- page A -->
<button type="submit">Search</button>
<!-- page B -->
<button type="submit">Find</button>
<!-- page C -->
<button type="submit" aria-label="Look up"><svg>…</svg></button><!-- every page -->
<button type="submit">Search</button>
<!-- or, with an icon, the same name everywhere -->
<button type="submit" aria-label="Search"><svg aria-hidden="true">…</svg></button><!-- page A -->
<a href="/forms/permit.pdf"><img src="download.svg" alt="Download form"></a>
<!-- page B -->
<a href="/forms/permit.pdf"><img src="arrow-down.svg" alt="Save to device"></a><!-- every page -->
<a href="/forms/permit.pdf"><img src="download.svg" alt="Download form"></a>// SwiftUI: each screen invents its own label
Button { search() } label: { Label("Find stops", systemImage: "magnifyingglass") }
// elsewhere
Button { search() } label: { Label("Look up", systemImage: "magnifyingglass") }// SwiftUI: one component, one label
struct SearchButton: View {
var action: () -> Void
var body: some View {
Button(action: action) {
Label("Search", systemImage: "magnifyingglass")
}
}
}// Jetpack Compose
IconButton(onClick = onSearch) {
Icon(Icons.Default.Search, contentDescription = "Find") // screen A
}
IconButton(onClick = onSearch) {
Icon(Icons.Default.Search, contentDescription = "Look up") // screen B
}// Jetpack Compose
@Composable
fun SearchAction(onSearch: () -> Unit) {
IconButton(onClick = onSearch) {
Icon(Icons.Default.Search, contentDescription = stringResource(R.string.search))
}
}