ARIA button, link, and menuitem must have an accessible name

ルールID: aria-command-name
ルールセット: axe-core 4.10
ユーザーへの影響: 深刻
ガイドライン: WCAG 2.1 (A), WCAG 2.0 (A), WCAG 2.2 (A), Trusted Tester, EN 301 549
 

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

深刻
Minor
Critical

Disabilities Affected

  • 視覚障害
  • ロービジョン
  • 運動障害

Standard(s)

  • WCAG 2.1 (A)
  • WCAG 2.0 (A)
  • WCAG 2.2 (A)
  • Trusted Tester
  • EN 301 549

WCAG 達成基準 [WCAG 2.1 (A)]

  • 4.1.2: 必須: Name, Role, Value

WCAG 達成基準 [WCAG 2.0 (A)]

  • 4.1.2: 必須: Name, Role, Value

WCAG 達成基準 [WCAG 2.2 (A)]

  • 4.1.2: 必須: Name, Role, Value

Trusted Tester Guidelines

  • 6.A: 必須: The purpose of each link or button can be determined from any combination of the link/button text, accessible name, accessible description, and/or programmatically determined link/button context.

EN 301 549 Guidelines

  • 9.4.1.2: 必須: Name, Role, Value

修正方法

Correct markup solutions

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

<div role="link" id="al" aria-label="Name"></div>

<div role="button" id="alb" aria-labelledby="labeldiv"></div>

<div role="menuitem" id="combo" aria-label="Aria Name">Name</div>

<div role="link" id="title" title="Title"></div>
  1. Ensure that each element with role="link", role="button", or role="menuitem" 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-command-name rule has four markup patterns that fail testing criteria:

<div role="link" id="empty"></div>

<div role="button" id="alempty" aria-label=""></div>

<div role="menuitem" id="albmissing" aria-labelledby="nonexistent"></div>

<div role="link" id="albempty" aria-labelledby="emptydiv"></div>
<div id="emptydiv"></div>

なぜ重要なのか

Screen reader users are not able to discern the purpose of elements with role="link", role="button", or role="menuitem" that do not have an accessible name.

ルールの説明

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

仕組みについて (簡単に言うと)

Checks all elements with role="link", role="button", or role="menuitem" to ensure that they have a discernable, accessible name.

リソース

axe 4.10 ルールの一覧 を参照する

この情報は役に立ちましたか?

すでにフィードバックをいただきました、ありがとうございます。.

あなたの回答は次のとおりです。

この情報は役に立ちましたか?
フィードバックが提出された日付/時刻: