ARIA treeitem nodes should have an accessible name

Rule ID: aria-treeitem-name
Ruleset: axe-core 4.9
User Impact: Serious
Guidelines: Deque Best Practice
 

Accessibility testing for dev teams - No experience required

Find and fix up to 80% of accessibility issues with axe DevTools Pro. Get started with your free trial today. No credit card needed.

Compliance Data & Impact

User Impact

Serious
Minor
Critical

Disabilities Affected

  • Blind
  • Low Vision
  • Mobility

Standard(s)

  • Deque Best Practice

    How to Fix the Problem

    Correct markup solutions

    The aria-treeitem-name rule has four markup patterns that pass test criteria:

    <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>
    
    1. Ensure that each element with role="treeitem" has one of the following characteristics:

      • Inner text that is discernible to screen reader users.
      • Non-empty aria-label attribute.
      • aria-labelledby pointing to element with text which is discernible to screen reader users.

    Incorrect markup solutions

    The aria-treeitem-name rule has four markup patterns that fail testing criteria:

    <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 are not able to discern the purpose of elements with role="treeitem" that do not have an accessible name.

    Rule Description

    Aria treeitem elements must have discernible text that clearly describes the destination, purpose, function, or action for screen reader users.

    The Algorithm (in simple terms)

    Checks all elements with role="treeitem" to ensure that they have a discernable, accessible name.

    Resources

    Refer to the complete list of axe 4.9 rules.

    Was this information helpful?

    You have already given your feedback, thank you..

    Your response was as follows:

    Was this information helpful?
    Date/Time feedback was submitted: