Skip to content

[ARIA] Requirement to ignore landmark roles without names creates infinite loop #2404

Open
@sideshowbarker

Description

https://w3c.github.io/aria/#document-handling_author-errors_roles contains this requirement:

Certain landmark roles require names from authors. In situations where an author has not specified names for these landmarks, it is considered an authoring error. The user agent MUST treat such elements as if no role had been provided.

In other words: (A) Determining whether a landmark role retrieved from a content role attribute value must be ignored requires computing the attribute’s element accessible name. But (B) computing the element’s accessible name requires retrieving the value of the element’s role attribute.

So implementing that creates an infinite loop — going back and forth from A to B and from B to A.

This problem similar to what’s described in w3c/html-aam#570. And I believe the solution is to do what AnneVK described at w3c/html-aam#570 (comment) — that is, “give "computing an accessible name" a boolean” [that allows callers to indicate that role-computing should not be performed].

That’s essentially what I ended up needing to do in my implementation, to prevent the code from looping endlessly.

Metadata

Assignees

Labels

clarificationclarifying or correcting language that is either confusing, misleading or under-specified

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions