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

[Question] wai-aria/role/listbox-roles.html wpt test #2012

Open
hs85jeong opened this issue Aug 25, 2023 · 7 comments · May be fixed by #2418
Open

[Question] wai-aria/role/listbox-roles.html wpt test #2012

hs85jeong opened this issue Aug 25, 2023 · 7 comments · May be fixed by #2418
Assignees
Milestone

Comments

@hs85jeong
Copy link

Hello @cookiecrook and @howard-e

I'm preparing a commit to fix the test that is failing on chromium.

If you can check the ARIA Spec, there is no text related to the User Agent regarding the case where the option is orphaned.
Could you check the reason why this test was added and where it is specified?
I can apply the changes only when this is confirmed.

Thank you.

@cookiecrook
Copy link
Contributor

cookiecrook commented Aug 25, 2023

As a summary for the ARIA WG members, various WPT tests ensure that "orphaned" roles—that is, roles that are used outside a required context—are invalidated by the engine... Examples include an orphaned listitem outside of a list, or a gridcell outside the context of a grid.

<div role="gridcell">Not a gridcell, because there is no row or grid context.</div>

The ARIA section on Required Accessibility Parent Role (formerly "scope" or "required context role") mentions a few requirements for authors (ensure the correct context) and user agents (ignore generics in between).

However, if I'm understanding @hs85jeong's issue correctly, they are concerned that there is not a requirement such as:

~User Agents SHOULD ignore the role if it occurs outside the context of a required accessibility parent role.

I am hopeful they agree with my summary above, and can clarify whether their opinion of the issue at hand is:

  1. "the WPT test is not a UA bug," or
  2. "it is a UA bug, but the spec needs to say so explicitly..."

I'm not sure which @hs85jeong is suggesting as the solution, and I don't want to assume.

@hs85jeong
Copy link
Author

My question is closer to 2.
If it is explicitly stated as 'User Agent' in the spec, we can implement it clearly.
However, it is expressed as 'Author' so it is not clear whether it is acceptable to proceed with this changes from user agent's perspective.

@cookiecrook
Copy link
Contributor

cookiecrook commented Aug 25, 2023

There is nothing precluding the User Agent from doing this, like a "User Agent SHOULD NOT or MUST NOT" statement, so I am confident it is acceptable to proceed with the Chromium patch.

That said, I think it's worth the ARIA Working Group considering whether to add:

~User Agents SHOULD ignore the role if it occurs outside the context of a required accessibility parent role.

@aleventhal
Copy link
Contributor

That said, I think it's worth the ARIA Working Group considering whether to add:

~User Agents SHOULD ignore the role if it occurs outside the context of a required accessibility parent role.

Aren't the WPT tests only going to fail on MUSTs?

@cookiecrook
Copy link
Contributor

cookiecrook commented Aug 28, 2023

okay then, Working Group SHOULD consider MUST… 😉

@scottaohara
Copy link
Member

note for self:
in author error section, need to specify what UA should do for instances where roles are used outside of their expected context.

@jnurthen jnurthen removed the Agenda label Nov 16, 2023
@jnurthen jnurthen added this to the 2024 milestone Nov 16, 2023
@rahimabdi
Copy link
Contributor

The WPT contextual role invalidation tests may be helpful here: web-platform-tests/interop-accessibility#20.

@scottaohara In addition to guidance on UA behavior for contextual roles, I'm curious if there's any crossover with this issue and the proposed role calculation algorithm: #2064.

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

Successfully merging a pull request may close this issue.

6 participants