---
title: ARIA Treeitem Accessible Name | Accessibility Rule
description: ARIA treeitem nodes should have an accessible name
source_url:
  html: https://testingbot.com/support/accessibility/web/rules/aria-treeitem-name
  md: https://testingbot.com/support/accessibility/web/rules/aria-treeitem-name/index.md
---
# Make sure every ARIA treeitem node has an accessible name

Rule ID: aria-treeitem-nameUser Impact: seriousGuidelines: Best Practices

The `aria-treeitem-name` rule checks that every element with `role="treeitem"` has an accessible name. This ensures that screen reader users can understand the purpose of each tree item in a tree view widget.

## What is being tested?

Each `role="treeitem"` element must have:

- Inner text that is visible to screen readers,
- A non-empty `aria-label` attribute, or
- An `aria-labelledby` attribute pointing to an element with discernible text.

## Correct markup examples

    <div role="treeitem" id="al" aria-label="Name"></div>
    
    <div role="treeitem" id="alb" aria-labelledby="labeldiv"></div>
    
    <div role="treeitem" id="combo" aria-label="Aria Name">Name</div>
    
    <div role="treeitem" id="title" title="Title"></div>

## Incorrect markup examples

    <div role="treeitem" id="empty"></div>
    
    <div role="treeitem" id="alempty" aria-label=""></div>
    
    <div role="treeitem" id="albmissing" aria-labelledby="nonexistent"></div>
    
    <div role="treeitem" id="albempty" aria-labelledby="emptydiv"></div>
    <div id="emptydiv"></div>

## Why it matters

Screen reader users rely on accessible names to understand the role and purpose of interface elements. Without an accessible name, a `treeitem` will be announced as a nameless item, making it difficult or impossible to navigate the tree.

## Other Rules

Interested in other web accessibility rules? Please see these other rules:

- [empty-heading](https://testingbot.com/support/accessibility/web/rules/empty-heading)
- [empty-table-header](https://testingbot.com/support/accessibility/web/rules/empty-table-header)
- [heading-order](https://testingbot.com/support/accessibility/web/rules/heading-order)
- [image-redundant-alt](https://testingbot.com/support/accessibility/web/rules/image-redundant-alt)
- [label-title-only](https://testingbot.com/support/accessibility/web/rules/label-title-only)
