ARIA Label
An attribute defined in the WAI-ARIA specification that gives a UI element an accessible name. It specifies the text that screen readers read aloud.
An ARIA label (aria-label) is an attribute defined in the WAI-ARIA (Accessible Rich Internet Applications) specification, developed by the W3C's WAI (Web Accessibility Initiative), and it gives a UI element an accessible name. It is used to provide text information for elements that have no visual label, and it serves as a cue when a screen reader reads that element aloud.
aria-label is especially useful for elements such as icon-only buttons and navigation landmarks, whose meaning comes across visually through the design but which lack text information. For example, if a search button shows only a magnifying glass icon, adding aria-label="検索" ("search") lets screen reader users understand the purpose of the button as well. Similarly, when a page has multiple <nav> elements, you can tell them apart with aria-label="メインナビゲーション" ("main navigation") and aria-label="フッターナビゲーション" ("footer navigation").
Related attributes include aria-labelledby (which references the text of another element) and aria-describedby (which references a supplementary description). While aria-label specifies text directly on the element, aria-labelledby obtains the name by referencing the ID of an existing element. The common rule of thumb is to prefer aria-labelledby when suitable text already exists on the page, and to use aria-label when no such text exists. If you write both on the same element, aria-labelledby takes precedence, so avoid using them together. Supplementary information such as operating instructions or cautions should not be crammed into aria-label; place it as visible text and link it with aria-describedby. Instructions are information that everyone needs, not only screen reader users.
The most common accident in practice is aria-label overriding an existing label. When aria-label is present, its value takes precedence over the text of the element's <label> element, the alt attribute of an image, and the title attribute of an iframe, and it is adopted as the accessible name. If you write wording that differs from the label shown on screen, you violate WCAG Success Criterion 2.5.3 "Label in Name" (Level A). This criterion requires that "for user interface components with labels that include text or images of text, the name contains the text that is presented visually." If you give a button that displays "送信" ("Submit") on screen the attribute aria-label="フォームを保存" ("Save form"), the button will not respond when a user operating by voice recognition says "送信". A name that differs from the visible label can also become a hidden command that is executed unintentionally.
Another pitfall is putting aria-label on an element where it has no effect. aria-label is valid only on roles that allow the author to provide a name, and it actually works on links, form controls, widgets, landmarks, images, iframes, and similar elements. A <span> or <div> without a specified role is assigned the generic role, for which naming is prohibited. The same applies to roles such as code, emphasis, strong, paragraph, and presentation, and any aria-label written on them is left without ever reaching assistive technologies.
In the first place, the use of ARIA should be limited to cases where native HTML labeling (the <label> element, the alt attribute, the text content of a <button>, and so on) is not sufficient. The first rule given in the W3C's "Using ARIA" is that if you can use a native HTML element or attribute with the semantics and behavior you require already built in, you should use it instead of repurposing another element and adding an ARIA role, state, or property. The second rule is "Do not change native semantics, unless you really have to." Excessive use of ARIA can actually harm accessibility and may change screen reader behavior in unexpected ways.
From a character counting perspective, the text of aria-label is not displayed on screen, but a screen reader reads it all at once when it reaches the element. The specification sets no limit on the number of words or characters. The criterion for judgment is "Is it the shortest expression that conveys the purpose of the element?" For buttons, use words that describe the action, such as "検索" ("search") or "閉じる" ("close"), and for navigation, add words that distinguish it from others, such as "メインナビゲーション" ("main navigation"). When "詳細を見る" ("view details") is repeated across items in a list, add only the words needed to distinguish them, as in aria-label="詳細を見る (製品 A)" ("view details (Product A)"). Placing the displayed text first and adding the distinguishing words after it also keeps the name consistent with calling the element by voice input. Conversely, a description longer than one sentence or a string of symbols only adds to the burden of listening and does not function as a name.