aria-role-name-present
ARIA roles that require an accessible name have one
Checks that the ARIA roles WAI-ARIA requires an accessible name for expose a non-empty one.
Applies to. Applies to elements whose role attribute is exactly one of grid, meter, progressbar, radiogroup or tree, and that are included in the accessibility tree. Membership is decided by WAI-ARIA's own "Accessible Name Required: True" characteristic, not by whether a role merely permits a name: tablist, toolbar, menu, menubar and scrollbar are name-from-author roles the spec does not require a name for, and are out of scope. meter and progressbar are also covered by meter-name-present and progressbar-name-present, which map to SC 1.1.1; this rule is what gives those two roles their 4.1.2 coverage.
Expectation. The element has a non-empty aria-label, an aria-labelledby that resolves to non-empty text, or a non-empty title. Every role in the set is name-from-author-only, so descendant text is not accepted: a labelled child inside a composite widget would otherwise pass the container that has no name of its own.
Examples
<div role="grid" aria-label="Orders"></div>
role="grid" requires an accessible name, and `aria-label` provides one.
<div role="grid"></div>
role="grid" requires an accessible name; none is present.