Skip to content

Visible label is part of accessible name (2ee8b8): Expectation seems to have unintended consequences #1458

Open
@kasperisager

Description

@kasperisager

The expectation currently reads:

For each target element, all text nodes in the visible text content either match or are contained within the accessible name of this target element, except for characters in the text nodes used to express non-text content. Leading and trailing whitespace and difference in case sensitivity should be ignored.

According to this expectation, something like the following passes the rule:

<button aria-label="How are you">
  <span>you</span>
  <span>How</span>
  <span>are</span>
</button>

That seems a little odd 🤔 Shouldn't the rule instead be looking at the concatenation of the data of the relevant text nodes?

Summoning @WilcoFiers as you authored #1419.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions