Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sideshowbarker opened this issue Dec 23, 2024 · 0 comments

Comments

@sideshowbarker
Copy link
Contributor

sideshowbarker commented Dec 23, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant