Skip to content

Should aria-prohibited-attr account for widget parents? #2953

@WilcoFiers

Description

@WilcoFiers

The aria-prohibited-attr check flags use of aria-label on elements where it will be ignored. In building that, we did not account for scenarios like the following, where because of the way the accessible name calculation works, the aria-label attribute is used in the name of the parent widget.

<button>
  <span aria-label="hello world"></span>
</button>

We need to do testing on this. Figure out if this works consistently across the supported AT, and if there are any differences between different browsers. For example, do links behave differently than buttons, because links don't have presentational children, but buttons (in some browsers) do. Does it matter if this is a native element, or an element with a role attribute. Does it matter if the element is focusable or not?

I'd like to see someone put together some test cases and try them with JAWS, NVDA & VO.

Metadata

Metadata

Assignees

Labels

fixBug fixesrulesIssue or false result from an axe-core rulestandardsIssues in the ARIA standards objects (lib/standards)support

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions