Button, link hoặc menuitem ARIA không có accessible name
Trong Neova Chạy ngay từ lần crawl: không cần thiết lập gì.
Quy tắc được rà soát lần cuối ngày 17 tháng 10 năm 2026 · Hướng dẫn cập nhật ngày 7 tháng 7 năm 2026
WCAG 4.1.2 yêu cầu mọi thành phần điều khiển phải có tên. Một phần tử mang một trong các role này mà không có tên sẽ không cho người dùng trình đọc màn hình biết nó làm gì.
Bạn có thể làm gì
Thêm văn bản bên trong phần tử, hoặc đặt cho nó aria-label hoặc aria-labelledby.
Vì sao Neova đánh dấu
Button, link hoặc mục menu không có tên chỉ được đọc theo role, nên người dùng không biết nó làm gì.
WCAG 4.1.2 (cấp độ A) yêu cầu mọi thành phần điều khiển trên giao diện phải có tên.
AI agent thao tác qua accessibility tree không thể chọn đúng thành phần điều khiển không có tên.
TL;DR: An element with role="button", role="link", or role="menuitem" has no accessible name, so a screen reader announces it as an unlabeled control with no idea what it does. Fix it by giving the element visible text, an aria-label, or an aria-labelledby reference. Better still, use a native <button> or <a> with real text. This maps to WCAG 4.1.2 Name, Role, Value.
What This Issue Means
Some controls on your page are not real buttons or links. A developer took a generic element such as a <div> or <span> and added an ARIA role to make it behave like a command. The three command roles are button, link, and menuitem. Assigning one of these roles promises assistive technology that the element is interactive. That promise is incomplete unless the control also carries an accessible name: a short piece of text that tells the user what it does.
This check flags every element with one of those roles that has no discernible name. Common culprits are icon-only buttons (a gear, a magnifying glass, a hamburger menu), image-based links with no alternative text, and custom menu widgets built from plain markup.
Why It Matters
A sighted visitor sees the gear icon and understands it opens settings. A screen reader user hears only "button" with no further description. They cannot tell a Search button from a Delete button from a Close button, so they often skip the control or activate it by accident.
This is a documented failure of WCAG Success Criterion 4.1.2 Name, Role, Value, a Level A requirement: every user interface component must expose a programmatically determinable name and role. An accessible name is also the label voice-control users speak to activate a control, and the label machine readers and AI agents rely on to interpret your interface, which is why explicit names are part of building a machine-readable web.
Ways to Give a Control Its Name
There is more than one way to name a control, and they are not equal. The browser resolves the name in a set order, and some methods are far more robust than others. Pick the highest one that fits your control.
Naming Method
Best For
Strength
Visible inner text
any control with an on-screen label
strongest: seen and heard match
aria-labelledby
reusing text that already exists nearby
strong: points to real, visible text
aria-label
icon-only controls with no text
good, but invisible to sighted users
title
last resort only
weak: hover-only, hidden on touch
How to Detect It
You do not need a screen reader to find these; three automated tools catch them from the markup alone.
axe DevTools (browser extension). Run a scan from the axe panel in your browser dev tools. The finding is aria-command-name, "ARIA commands must have an accessible name," and each result points to the unlabeled role="button", role="link", or role="menuitem".
Google Lighthouse. Open the Lighthouse tab in Chrome, run an Accessibility report, and read the failing-elements list under the ARIA command-name audit. Good for catching every instance across a page in one pass.
ARIA DevTools (browser extension). It shows the computed accessible name for each control as assistive technology would read it. If a button's name column is empty, that is your bug; if it shows the wrong text, your naming source is pointing at the wrong thing.
How to Fix It
Option 1: Use a Native Element (Preferred)
The cleanest fix is to stop reinventing controls. A native <button> or <a href> brings the correct role, keyboard behavior, and focus handling for free. You only need to supply the name.
<!-- Native button with visible text -->
<button type="button">Search</button>
<!-- Icon-only native button, name via aria-label -->
<button type="button" aria-label="Search">
<svg aria-hidden="true" focusable="false">...</svg>
</button>
Option 2: Add a Name to the ARIA Control
If you must keep the ARIA role, give it a name with one of the methods below.
<!-- Visible inner text -->
<div role="button" tabindex="0">Submit</div>
<!-- aria-label for an icon-only control -->
<div role="button" tabindex="0" aria-label="Close dialog">
<span aria-hidden="true">×</span>
</div>
<!-- aria-labelledby pointing to existing text -->
<span id="lbl">Open settings</span>
<div role="button" tabindex="0" aria-labelledby="lbl">
<svg aria-hidden="true">...</svg>
</div>
Keep names short and specific. Write what the control does ("Close dialog"), not what it looks like ("X icon"). Hide decorative icons with aria-hidden="true" so they do not interfere with the name. For deeper guidance see our checks on buttons must have discernible text and links must have discernible text.
False Positives and Edge Cases
A few patterns can trip the rule even when the intent looks fine:
Name injected after load. If JavaScript sets the label only after a delay, a snapshot scan may catch the control before the name exists. Re-test after the interface settles, and prefer markup named on first render.
Text hidden the wrong way. Inner text styled with display:none or visibility:hidden is removed from the accessibility tree, so it does not count. Use a visually hidden (clip) technique for a label that is read but not seen.
aria-labelledby that points nowhere. If the referenced id does not exist or its target is empty, the name resolves to nothing. Confirm the id matches real text.
Wrong role on a non-control. If an element was never meant to be interactive, the fix is to remove the role, not bolt on a label.
Frequently Asked Questions
Does a title attribute satisfy the rule?
A title attribute clears the automated check but is the weakest option: it appears only on mouse hover, is hidden on touch devices, and support is uneven. Prefer visible text, aria-label, or aria-labelledby.
Is this an SEO problem or only accessibility?
It is primarily accessibility, but the same missing label also weakens how voice assistants and AI crawlers understand your controls. Named controls are easier for every automated agent to interpret.
Why not just always use aria-label?
When a control already has visible text, that visible text should be the name so the spoken label matches what users see and voice-control users can say it. Reserve aria-label for icon-only controls that have no on-screen text.
Can a single page have many of these errors?
Yes. Icon toolbars, custom menus, and component libraries repeat the same unlabeled pattern many times. Fix the shared component once and every instance clears together.