ARIA (Accessible Rich Internet Applications) adds semantic information—such as roles, states, and properties—to web interfaces so assistive technologies can properly interpret and announce dynamic or complex user interface (UI) components. It’s designed to supplement native HTML by improving accessibility when built‑in semantics alone aren’t sufficient. It also helps define page structures and identify dynamically changing content on the page (also known as live regions).
Correctly applying ARIA labels is essential for web accessibility. These labels provide accessible names for control elements in a UI, so that screen readers and other assistive technologies can describe their role, state, and purpose to users. But when ARIA is used improperly, it can create additional issues for people with disabilities. So, how do you know if you’re getting it right?
This article explains how to use ARIA effectively alongside native HTML to clearly label UI elements. We’ll include specific examples of best practices, along with common mistakes to avoid.
Key insights
- When it’s used improperly, ARIA can override correct HTML semantics and add unnecessary complexity.
- Best practice is to use semantic HTML first for labels, roles, and native controls. Add aria-label sparingly and only when a visible label is not practical.
- When there is visible label text, ensure the accessible name contains it.
- For naming priority, use aria-labelledby to reference on‑screen text, then aria-label. Fall back to the title attribute only with care.
- For icon‑only buttons, label the button (not the SVG). Hide decorative graphics and keep the name concise.
- Pair names with aria-describedby for additional instructions or errors, so users receive the hint after the name.
- Free tools, like DevTools in Google Chrome, can help you quickly spot-check for correct ARIA use. However, it’s important to verify results through accessibility testing with assistive technologies like screen readers.
What is an accessible name?
An accessible name is the programmatic name given to a user interface element. It is the text associated with an HTML element that assistive technologies—such as screen readers—use to identify and announce that element to the user. Speech recognition software also utilizes accessible names to allow users to activate controls by voice.
A good accessible name communicates the purpose, intent, or function of the element, helping users understand what it does and how they can interact with it. Ideally, each element on a page should have a unique and descriptive accessible name. This uniqueness allows users to distinguish one element from another and quickly identify the control they want to use.
An algorithm called the Accessible Name and Description Computation determines how HTML elements, ARIA attributes, and other signals combine into a single accessible name. Below is a simplified process flow. Note that there are element-specific differences that are not part of the list:
- aria-labelledby: When present, it typically becomes the primary source for an element’s accessible name.
- aria-label: Used to supply a custom name when no aria-labelledby reference is available.
- Native HTML: Derives names from built‑in mechanisms like <label for=”…”> on form inputs, alt text on images, or the visible text inside <button> and <a> elements.
- Title attribute: Generally treated as a fallback, contributing only when no stronger naming method is provided.
Once the algorithm determines the element’s accessible name, browsers expose that name to screen readers via accessibility APIs, which serve as bridges between accessibility software, websites, and users. Variations exist across screen readers, but correctly applied naming usually produces consistent results. If you want to check the accessible name of an element, you can use tools like Chrome DevTools to inspect its computed name and role.
What is the difference between a native label and the aria-label attribute?
Understanding how native HTML labels differ from ARIA labeling techniques is key to building robust and intuitive interfaces. Each method produces an accessible name, but they do so in different ways—with different implications for usability, maintainability, and compliance.
The native HTML <label> tag connects form controls (for example, an input field) to label text that is displayed on the page, while also allowing the user to click on the label and focus the form field. With a proper <label for=”…”>, the user agent and assistive technologies expose an accessible name that matches the visible label. In contrast, the ARIA label (the aria-label attribute) assigns a string name programmatically; it is not present as text content by default.
To provide a clear and cohesive experience for users, it’s best practice to use the native label first, so the name communicated to screen reader users aligns with the visible label. If this isn’t possible (for example, the visible text isn’t descriptive or unique enough), use aria-labelledby next, and finally aria-label as a fallback.
Overview of common ARIA attributes
ARIA can be used in a wide variety of ways to add semantics when native HTML falls short. Common ARIA attributes include:
- aria-label: Provides an explicit accessible name for an element when no suitable visible label is available.
- aria-labelledby: Uses the text of referenced elements to define the element’s accessible name, usually taking priority over aria-label.
- aria-describedby: Points to other elements whose text offers additional descriptive information for assistive technologies.
- aria-expanded: Indicates whether a collapsible widget is currently expanded (true) or collapsed (false).
- aria-hidden: Specifies whether an element should be hidden from assistive technologies, even if visible on screen.
- aria-live: Defines how assertively updates in a dynamic region should be announced to assistive technologies.
- aria-controls: Identifies the element or elements whose content or behavior is controlled by the current node.
- aria-current: Marks the current or active item within a set, such as the active page or step.
Developers should note that some ARIA attributes can only be used on certain types of roles—either implicit roles or explicit roles. Generally, however, ARIA attributes are most effective when they’re used to clarify dynamic state, not to replace native elements. Remember: the first rule of ARIA is that no ARIA is better than bad ARIA—pages with heavy ARIA often correlate with more detectable errors, reinforcing the value of native patterns.
What is the difference between aria-labelledby and aria-describedby?
ARIA offers two powerful attributes—aria-labelledby and aria-describedby—that help structure names and descriptions without duplicating text. Intentionally applying each ensures that users receive clear, purposeful messaging while navigating your interface.
- aria-labelledby: References visible text that already appears on screen, ensuring the accessible name matches what users see.
- aria-describedby: Attaches additional information such as instructions, error messages, or clarifying notes.
Below is a code snippet that uses ARIA to create an accessible custom dialog component. It uses “dialog” to indicate to assistive technologies that the component is a dialog box, aria-labelledby to point to an element (e.g., a heading) that provides the dialog’s accessible name, and aria-describedby to reference text that provides the dialog’s accessible description, such as instructions or context.
<div role="dialog"
aria-labelledby="dlgTitle"
aria-describedby="dlgDesc">
ARIA labels and WCAG
Effectively using ARIA attributes and native HTML supports conformance with the Web Content Accessibility Guidelines (WCAG), the global standard for web content accessibility. In particular, thoughtful and deliberate ARIA usage can help organizations meet the following success criteria:
- SC 2.5.3 Label in Name (Level A): The visible label must be part of the accessible name.
- SC 4.1.2 Name, Role, Value (Level A): Controls must expose a valid name, role, and value.
- SC 3.3.2 Labels or Instructions (Level A): Provide clear labels or instructions for all UI elements that require user input.
For more technical guidance on how to (and how not to) apply ARIA to conform with WCAG, reference the WCAG understanding documents from the Worldwide Web Consortium (W3C).
Practical examples for buttons, links, forms, and landmarks
Examples are the fastest way to understand ARIA naming in real‑world scenarios. This section walks through common components—buttons, links, form fields, and landmarks—and shows how to apply ARIA attributes correctly to ensure clarity and consistency for all users.
Icon‑only buttons
Many modern UI interfaces include icon‑only controls (for example, SVG icons that serve as menu buttons). Because these buttons do not include native HTML labels, it’s essential to provide an accessible name via ARIA so that their purpose is understandable to users. Use the aria-label attribute to name the button, and the aria-hidden attribute to hide the decorative SVG icon.
Here is an example of aria-label being applied to an icon button that opens a menu:
<button aria-label="Menu">
<svg aria-hidden="true" ...></svg>
</button>
This ensures a screen reader will announce “Menu, button,” matching the element’s purpose.
Ambiguous links
Link text like “Read more,” “Click here,” or “More” provide no meaning out of context. While it’s best practice to avoid this type of generic link text altogether, if using it is essential, you can apply aria-labelledby to ensure the link’s accessible name clearly communicates its destination. Remember that WCAG 2.5.3 encourages keeping visible text inside the accessible name—so the name you provide with ARIA should still include the original link text.
Here is an example of aria-label being used to clarify that a hyperlink leads to a pricing page:
<a href="/pricing" aria-labelledby="pricing-heading">
Learn more
</a>
Form fields with extra instructions
When a form field includes hints or additional instructions, you can use <label> or aria-labelledby for the name, then aria-describedby for the hint.
The example below creates an accessible password input field where screen readers will announce “Password, edit text. Minimum 12 characters.” The aria-labelledby line tells screen readers to use the text inside #pw-label (“Password”) as the field’s accessible name, while the aria-describedby attribute adds the supplemental hint (“Minimum 12 characters”) as the accessible description, announced after the name.
<label id="pw-label" for="pw">Password</label>
<p id="pw-hint">Minimum 12 characters</p>
<input id="pw" type="password" aria-describedby="pw-hint">
Navigation landmarks and ARIA labels
Landmarks enable users—especially those using assistive technology—to move quickly around a page. When multiple sections serve similar purposes, unique labels help distinguish them and improve navigation efficiency.
Landmarks (for example, <header>, <main>, <nav>, <footer>) help users and assistive technologies move between major regions. If you have multiple navigation menus or repeated sections, add aria-label or aria-labelledby to give each a unique name and avoid duplicate region names.
The snippet below defines a named navigation region called “Primary menu”, which will be announced by screen readers as the name of this navigation region. It gives screen reader users a clear orientation point while browsing.
<nav aria-label="Primary menu">
<ul>
<li><a href="/shop">Shop</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
</nav>
How to test for appropriate ARIA label usage
Both automated and manual testing are essential to ensure elements are labeled correctly, and that accessible names behave consistently where it matters most—during real user interaction.
Automated testing
Automated tools can catch many structural ARIA issues—like missing accessible names, incorrect references, or misapplied roles. However, automation cannot verify whether visible labels match accessible names or whether ARIA enhances the experience rather than overriding correct semantics.
Free tools such as the Accessibility Tree in Google Chrome DevTools and Google Lighthouse help verify computed names, roles, and descriptions and flag common markup issues.
Paid solutions extend this by offering deeper analysis and automated regression checks. Level Access developer tools—including the browser extension, Level CI, and automation SDKs—allow teams to validate ARIA usage across full user flows and ensure naming patterns stay consistent throughout development.
Manual evaluation
Even with strong tooling, expert evaluation remains essential. Misused ARIA can break semantics, create misleading output, or disrupt keyboard behavior—problems frequently encountered when developers override native elements or apply roles incorrectly. Experts can confirm whether names are meaningful, concise, and aligned with user expectations across assistive technologies.
If expert support isn’t available, you can still perform a quick manual check. Use DevTools to confirm an element’s computed accessible name matches its visible label, then test with a screen reader (NVDA, VoiceOver, or TalkBack) to ensure each control is announced clearly and behaves as expected. This simple workflow can help you catch many common naming and ARIA‑related issues before they reach users.
Best practices and common mistakes
Ready to start incorporating ARIA labels into your toolkit for accessible web development? The following quick list of “dos” and “don’ts” will help you apply ARIA effectively and avoid pitfalls that complicate user experience.
Do this:
- Prioritize native semantics: Native HTML automatically provides correct roles, states, and behaviors, reducing the risk of interaction bugs and markup errors—issues that increase significantly when developers rely too heavily on ARIA.
- Use aria-labelledby to align names with visible wording: Referencing on‑screen text ensures the accessible name aligns with the visual label, preventing the confusion that arises when names don’t match.
- Keep names short and meaningful: Concise, action‑oriented names reduce verbosity and avoid the “noise” created by excessive or unclear ARIA usage. Good examples include “submit form” or “open menu.”
- Pair names with aria-describedby for additional information: Attach longer guidance—like requirements or error messages—without overloading the accessible name.
- Ensure links communicate their purpose clearly: Ambiguous links (e.g., empty or unclear link text) are a common culprit for accessibility failures. Avoid using generic text like “learn more,” and provide more descriptive accessible names for links using ARIA if generic visible link text is unavoidable.
Avoid this:
- Conflicting names: Mismatched labels (for example, visible text reading “Save” with an aria‑label that reads “Store”) violate naming expectations and create disorientation for screen reader and speech input users.
- Overuse of ARIA when a default HTML control already provides semantics: ARIA-heavy pages consistently show much higher error rates; relying on ARIA instead of native elements introduces avoidable accessibility problems
- Adding names to non‑interactive elements without appropriate roles: While some screen readers may not even notice misapplied roles or labels, these can make static elements “sound” interactive while offering no actual functionality—producing dead ends for assistive technology users.
ARIA labeling: Bringing accessible naming together
Building accessible, resilient interfaces starts with thoughtful naming—using clear, consistent accessible names, relying on native HTML whenever possible, and applying ARIA only where it meaningfully adds clarity.
When used effectively, ARIA labels help assistive technologies convey purpose and context so users can navigate complex interfaces with confidence. But when misapplied, they can obscure semantics, break expected interactions, or introduce unnecessary noise. Getting it right means understanding how ARIA naming works, choosing the right attribute for the right scenario, and validating that every label enhances—not undermines—the user experience.
The Level Access solution combines the power of AI and automation with essential human judgment. Our experts can evaluate your current workflow, identify gaps in ARIA validation, and recommend the right mix of automated tools and manual testing. If you’re looking to strengthen your accessibility practice, explore our developer tools or contact our team to start building more seamless, accessible user experiences.
Frequently asked questions
What is an ARIA label?
It’s an ARIA attribute that sets an accessible name on a control when no visible wording is available. Use aria-label sparingly and utilize aria-labelledby or native labels first.
When should you use ARIA labels?
When there’s no visible label (e.g., icon‑only buttons) or you need to expose a concise programmatic name. Use aria-labelledby when possible.
Is aria-label the same as alt text?
No. The alt attribute is the correct and required way to provide alternative text for a real HTML image (). Screen readers rely on the alt attribute to describe the image, and aria-label should not be used as a substitute on an
element. Here is an example of alt text for an HTML image:
<img src="chart.png" alt="Revenue chart for Q4 2025">
However, if you need to make a non-image element—such as a
—act like an image using role=”img”, you cannot use the alt attribute because alt is valid only on . In those situations, you can provide the accessible name using aria-label or aria-labelledby. For example:
<div role="img" aria-label="Revenue chart for Q4 2025"></div>
What is the difference between label and aria-label?
What is the difference between an accessible name and an element’s role?
An accessible name tells assistive technology users what a control is called, while an element’s role defines what it is and how it should behave.
Accessible names identify controls, like “Submit,” “Close dialog,” or “Next page”—so that screen readers can announce it meaningfully. In contrast, an element’s role tells users what kind of object it is—for example, a button, link, dialog, or navigation region. Roles define the semantic type of the component and indicate what behaviors and keyboard interactions users should expect.
Together, they answer two different but equally important questions for assistive technologies:
- Role: What is this element?
- Accessible name: Which one is it, and what does it do?
This distinction is essential because correct roles ensure expected behavior, while clear accessible names ensure users can identify the right control and understand its purpose. Importantly an element’s role should not be included in its accessible name, as the role will be provided to users separately.
When should you use ARIA roles?
Developers can use ARIA to clarify roles if native HTML alone isn’t sufficient. ARIA roles define what an element is supposed to be, supplementing non‑semantic elements when native HTML can’t provide the right meaning. Because assigning a role implies expected behavior, misusing roles (for example, giving a role=“tabpanel” when no tabs exist) can mislead users and harm accessibility.
The W3C describes a role as a promise: declaring a role like button means the developer must also provide the expected behavior, since ARIA roles do not automatically supply keyboard or interaction patterns.