Skip to content
WebABLE™
  • Categories
    • Archives
    • Arts/Entertainment
    • Assistive Technology
    • Business
    • Education
    • Employment
    • Events
    • Gaming/Sports
    • Government/Law
    • Healthcare
    • Independent Living and Caretaking
    • News/Media
    • Publications
    • Resources/Services
    • Technology
    • Tools
    • Travel
  • Blog
  • Calendar
    • Submit Events
  • Subscribe
Premium Sponsor Centrus Digital Marketing
Home » Articles » Technology » Using the aria-label attribute – Accessibility | MDN

Using the aria-label attribute – Accessibility | MDN

Imported May 11, 2021

Using the aria-label attribute

Draft

This page is not complete.

The aria-label attribute is used to define a string that labels the current element. Use it in cases where a text label is not visible on the screen. If there is visible text labeling the element, use aria-labelledby instead.

This attribute can be used with any typical HTML element; it is not limited to elements that have an ARIA role assigned.

Value

string

Possible effects on user agents and assistive technology

Note: Opinions may differ on how assistive technology should handle this technique. The information provided above is one of those opinions and therefore not normative.

Examples

Example 1: Multiple Labels

In the example below, a button is styled to look like a typical “close” button, with an X in the middle. Since there is nothing indicating that the purpose of the button is to close the dialog, the aria-label attribute is used to provide the label to any assistive technologies.

<button aria-label=“Close“ onclick=“myDialog.close()“>X</button>

Notes

  • The most common accessibility API mapping for a label is the accessible name property.
  • Attributes, including aria-label declarations, are ignored by most automatic translation services.

Used by ARIA roles

all elements of the base markup

Related ARIA techniques

  • Using the aria-labelledby attribute

Elements supporting aria-label

The aria-label attribute should only be used on [...]

Read article at developer.mozilla.org

Article Taxonomies

Categories: Technology

Accessibility


5 stars; 94.6% of tests passed with 88 unique errors.
Errors
Level ALevel AALevel AAAUnique
72455488

FacebookX.comLinkedIn

Read article at developer.mozilla.org

Post navigation

Older Article
Newer Article
  • About WebABLE
  • Articles
  • Blog
  • Accessibility Statement
  • Subscribe for Updates
  • WebABLE.tv

Ask about WebABLE Ads™

Become a Sponsor

  • Twitter
  • LinkedIn
  • Facebook

© 2020- WebABLE™, LLC • All rights reserved, except where reserved by the original authors.