You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "Ensures ARIA attributes are allowed for an element's role",
"help": "Elements must only use allowed ARIA attributes",
"helpUrl": "https://dequeuniversity.com/rules/axe/4.2/aria-allowed-attr?application=webdriverjs",
"id": "aria-allowed-attr",
"impact": "serious",
"nodes": [
{
"all": [],
"any": [],
"failureSummary": "Fix all of the following:\n ARIA attribute cannot be used, add a role attribute or use a different element: aria-label",
"html": "<div id=\"aria-label-1\" role=\"code\" aria-label=\"foo\">bar</div>",
"impact": "serious",
"none": [
{
"data": [
"aria-label"
],
"id": "aria-prohibited-attr",
"impact": "serious",
"message": "ARIA attribute cannot be used, add a role attribute or use a different element: aria-label",
"relatedNodes": []
}
],
"target": [
"#aria-label-1"
]
},
So an error has been flagged, but the message makes me wonder if the reason is correct. "Add a role attribute"; it's there, role="code". code is one of those new role-parity roles for ARIA 1.2. I'm seeing similar messages in the JSON for the other role-parity roles.
ARIA 1.2 introduced name prohibition on certain roles. See: https://www.w3.org/TR/wai-aria-1.2/#namefromprohibited
Where name is prohibited, "Authors MUST NOT use the aria-label or aria-labelledby attributes to name the element." See: https://www.w3.org/TR/wai-aria-1.2/#namecalculation
Product: cli
Step to reproduce:
Expected results: Every element with an
id
whose value starts witharia-label
would be flagged as a violation.Actual results: Only half of them are:
The even-numbered ones happen to be specific elements rather than
div
with the ARIArole
set. For instance:The text was updated successfully, but these errors were encountered: