w3c / aria

Accessible Rich Internet Applications (WAI-ARIA)
https://w3c.github.io/aria/
Other
627 stars 118 forks source link

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

Open hs85jeong opened 10 months ago

hs85jeong commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

okay then, Working Group SHOULD consider MUST… 😉

scottaohara commented 9 months ago

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.

rahimabdi commented 2 months ago

The WPT contextual role invalidation tests may be helpful here: https://github.com/web-platform-tests/interop-accessibility/issues/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: https://github.com/w3c/aria/issues/2064.