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

Testable statements using prohibited attribut/name #180

Open
Jym77 opened this issue Jan 6, 2023 · 1 comment
Open

Testable statements using prohibited attribut/name #180

Jym77 opened this issue Jan 6, 2023 · 1 comment
Assignees

Comments

@Jym77
Copy link

Jym77 commented Jan 6, 2023

Several testable statements, e.g. Name test case 596 use pattern like:

if given
  <div id="test" aria-labelledby="ID1">foo</div>
  <span id="ID1">bar</span>
then the accessible name of the element with id of "test" is "bar"

However, with ARIA 1.2 and the current HTML AAM, div is mapped to generic role which prohibits name (and aria-label(ledby) attribute); in turn Step 1 of the name computation says to return the empty string on role that prohibit naming.

So, div#test actually has no name and the test breaks 😞
It seems replacing the div with a button would solve the problem in most (maybe all) these cases.

@scottaohara
Copy link
Member

@jnurthen @accdc, we have been so focused on the ARIA spec clarifying that name prohibited is an author requirement (w3c/aria#1487) and not presently a user agent requirement, that we seem to have missed these updates where in this spec name prohibited is implying that the element has no name. Rather, this likely should instead state "is not intended to be named" - or "may not return a name". Those wordings would better match reality and would better align with our current intent of limiting this to an author requirement, but not barring user agents from returning a name if authors name generics (boo).

Quickly, maybe the prohibited definition could change from

the element has no name.

to

the element is not meant to support naming a name.

and for step 1, either change:

If the root node's role prohibits naming, return the empty string ("").

to

If the root node's role prohibits naming, user agents MAY return the empty string ("").

or simply remove that particular text for now.

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

3 participants