Level
A
Since
WCAG 2.0
Entries
129 / 193
/ WCAG criterion

4.1.2 Name, Role, Value

Every control needs a name and a role in the markup, or assistive technology cannot say what it is.

/ What it requires

Assistive technology does not look at the screen. It asks the browser what each control is called, what kind of control it is and what state it is in. This criterion requires all three to be available in code for every user interface component: a name, a role, and any state or value the user can change, with changes reported as they happen. Without them a screen reader says "button" and nothing more, or says nothing at all, and voice control cannot address the control.

Native HTML controls used as specified meet this without extra work: a button element with text, an input with a label, a link with content. The criterion bites on what authors build themselves, such as a div that reacts to clicks, a custom dropdown or an accordion. Those need a role, an accessible name, and state attributes such as aria-expanded or aria-checked that script keeps up to date. It names no exceptions. A control that works with a mouse and is missing from the accessibility tree fails.

/ How pages fail it

  • A button contains only an icon and has no text, no aria-label and no title.
  • A div or a span with a click handler acts as a button and has no role.
  • A text field has no label element, no aria-label and no aria-labelledby.
  • An accordion or a menu button opens and closes without ever changing aria-expanded.
  • An aria-labelledby attribute names an id that does not exist on the page, so the computed name is empty.

/ How to check it yourself

  1. Tab through the page with a free screen reader such as NVDA running. At every stop you should hear a name, a role and, where it applies, a state.
  2. Inspect each control in the Accessibility pane of the browser developer tools and read its Name, its Role and its state properties.
  3. Operate every custom widget: open the accordion, flip the toggle, pick an option. Check that the state shown in the accessibility tree changes with it.
  4. Run a free browser extension such as axe DevTools or WAVE to list controls with no name, then confirm its findings by hand.
  5. Search the source for aria-labelledby, aria-describedby and aria-controls and confirm that every id they mention exists.

/ How to fix it

  • Use the native element first: button for actions, a with href for navigation, and input, select and textarea for data.
  • Name icon buttons with aria-label or with visually hidden text inside the button, and give every iframe a title attribute.
  • Connect each field to a label element through for and id, or use aria-labelledby where a visible text already serves as its label.
  • On custom widgets, set the role and keep aria-expanded, aria-checked or aria-selected in step with what the widget shows, from the same script that changes it.
  • Do not put aria-hidden="true" on anything that contains focusable elements, and give an open dialog aria-modal="true" and a name.

/ What our scanner checks

The static pass counts fields with no aria-label, aria-labelledby, title or matching label for. In the rendered page our rules report empty accessible names, ARIA references to missing ids, focusable content under aria-hidden, untitled iframes, and dialogs, comboboxes and accordions lacking state attributes. axe and HTML_CodeSniffer add unnamed buttons, links and fields and invalid ARIA values. Nothing operates a widget, so state changes go untested.

/ Who fails it, in our own measurements

Measured bodies failing this criterion, most instances first
BodySectorInstancesScore
Gdańskcity · PL1302
Toruńcity · PL8211
Bundesagentur für Arbeitgovernment · DE5816
Bundesministerium für Bildung und Forschunggovernment · DE498
Bundeszentrale für politische Bildunggovernment · DE4110
Poznańcity · PL271
Polski Instytut Sztuki Filmowejculture · PL217
Uniwersytet Jagiellońskieducation · PL211
PKP Intercitytransport · PL202
Stuttgartcity · DE206
Nürnbergcity · DE185
Policjagovernment · PL1812
Social Security Administrationgovernment · US16-
Deutsche Bahntransport · DE156
Rzeszówcity · PL158
Universität Heidelbergeducation · DE1521
Uniwersytet Warszawskieducation · PL153
Urząd Ochrony Danych Osobowychgovernment · PL136
Deutsche Rentenversicherunggovernment · DE125
Komisja Nadzoru Finansowegogovernment · PL128
Poczta Polskagovernment · PL1216
Szczecincity · PL123
Hamburgcity · DE1122
Technische Universität Müncheneducation · DE1112
Bundesministerium der Justizgovernment · DE107
Politechnika Warszawskaeducation · PL1012
RWTH Aacheneducation · DE1018
State of Pennsylvaniagovernment · US1021
Centers for Disease Controlhealth · US98
Bremencity · DE85
Houstoncity · US87
King Countygovernment · US813
New Orleanscity · US87
New York Public Libraryculture · US824
Phoenixcity · US81
Uniwersytet im. Adama Mickiewiczaeducation · PL812
Bundesregierunggovernment · DE74
Seattlecity · US712
Teatr Wielki Opera Narodowaculture · PL73
Amtraktransport · US61
Baltimorecity · US67
Berliner Verkehrsbetriebetransport · DE621
Freie Universität Berlineducation · DE67
LA Metrotransport · US617
Ohio State Universityeducation · US66
Philadelphiacity · US68
State of Floridagovernment · US68
Uniwersytet Marii Curie-Skłodowskiejeducation · PL69
Düsseldorfcity · DE59
Gliwicecity · PL513
Indianapoliscity · US518
Krakówcity · PL512
Miami-Dade Countygovernment · US520
Nashvillecity · US514
Opolecity · PL58
Rybnikcity · PL57
Sąd Najwyższygovernment · PL514
Biblioteka Narodowaculture · PL417
Los Angeles Countygovernment · US410
Olsztyncity · PL48
Pacjent.gov.plhealth · PL49
Państwowa Inspekcja Pracygovernment · PL410
Politechnika Poznańskaeducation · PL44
Stiftung Preußischer Kulturbesitzculture · DE421
Uniwersytet Mikołaja Kopernikaeducation · PL47
Bundesministerium des Innerngovernment · DE310
Bundesratgovernment · DE314
Las Vegascity · US38
Narodowy Fundusz Zdrowiahealth · PL318
Sejm RPgovernment · PL39
Senat RPgovernment · PL324
Statistisches Bundesamtgovernment · DE39
University of Floridaeducation · US323
Zamek Królewski w Warszawieculture · PL316
Bostoncity · US26
Bundesministerium der Finanzengovernment · DE213
Chicago Transit Authoritytransport · US24
Deutsche Nationalbibliothekculture · DE223
Dresdencity · DE215
Koleje Mazowieckietransport · PL217
New York Citycity · US237
Państwowa Komisja Wyborczagovernment · PL215
Politechnika Łódzkaeducation · PL25
Politechnika Śląskaeducation · PL22
Prezydent RPgovernment · PL212
San Franciscocity · US228
State of Texasgovernment · US222
Trybunał Konstytucyjnygovernment · PL214
University of Texas at Austineducation · US221
Veterans Affairsgovernment · US233
Zakład Ubezpieczeń Społecznychgovernment · PL227
Łódźcity · PL23
Bundesministerium für Gesundheitgovernment · DE146
Bundesnetzagenturgovernment · DE19
Bundestaggovernment · DE110
Cook Countygovernment · US111
Dallascity · US123
Department of Laborgovernment · US146
Detroitcity · US140
Gdyniacity · PL17
Hannovercity · DE110
Harris Countygovernment · US119
Karlsruher Institut für Technologieeducation · DE119
Krajowa Administracja Skarbowagovernment · PL15
Kölncity · DE116
Leipzigcity · DE122
Library of Congressculture · US130
Ludwig-Maximilians-Universität Müncheneducation · DE112
Minneapoliscity · US179
NASAgovernment · US120
Narodowy Bank Polskigovernment · PL123
Narodowy Instytut Dziedzictwaculture · PL16
Narodowy Instytut Zdrowia Publicznegohealth · PL125
Państwowa Straż Pożarnagovernment · PL128
Politechnika Gdańskaeducation · PL122
Politechnika Wrocławskaeducation · PL117
Radomcity · PL12
Rzecznik Praw Obywatelskichgovernment · PL142
Smithsonianculture · US114
State of Georgiagovernment · US156
Szkoła Główna Handlowaeducation · PL112
Tychycity · PL120
Uniwersytet Wrocławskieducation · PL113
Uniwersytet Łódzkieducation · PL19
Uniwersytet Śląskieducation · PL18
Warszawacity · PL120
Warszawski Uniwersytet Medycznyeducation · PL113
Wrocławcity · PL12
Zielona Góracity · PL17

One page per body, measured by automated checks on a weekly schedule. Any body that has fixed something since the last sweep will show it at the next one, and every entity page carries a right of reply.

/ Questions about this criterion

What is an accessible name?

It is the text a browser exposes to assistive technology as the name of an element. The browser computes it in a fixed order: aria-labelledby first, then aria-label, then the native source such as a label element, the alt attribute or the text inside a button or link, and last the title attribute. A screen reader announces it together with the role, as in "Search, button".

Do I need ARIA to meet Name, Role, Value?

Often not. Native HTML elements already carry a role, take their name from their content or label, and report their own state. ARIA is needed when you build a control that HTML does not offer, or when a native control has no visible text to name it. ARIA on an element that does not behave like the role it claims makes things worse.

Why does a screen reader only say "button" on my page?

Because the button has a role and no accessible name. The usual cause is an icon button: an svg or a background image inside a button element with no text. Add an aria-label that says what the button does, or put visually hidden text inside it. If the icon is an img element, give it alt text, which then names the button.