interop-accessibility icon indicating copy to clipboard operation
interop-accessibility copied to clipboard

Add additional "name from content" tests for menus and tables

Open cookiecrook opened this issue 2 years ago • 6 comments

@rahimabdi's review feedback on https://github.com/web-platform-tests/wpt/pull/42354 incldued:

  • menuitem (applied to a <button> or <a>)
  • <table> cells and headers (e.g., <td>, <th>)

I think it's a good idea, but as I mentioned in reply, "menus, tables, and grid implementations are so unique that I think these should be in their own test files."

Filing this as a follow-on issue to not block completion of the Interop 2023 tasks.

cookiecrook avatar Oct 09 '23 21:10 cookiecrook

@cookiecrook @rahimabdi Is this issue ok for me to work on?

lolaodelola avatar Mar 13 '25 18:03 lolaodelola

@lolaodelola Certainly, please feel free to assign to yourself. Thank you!

rahimabdi avatar Mar 14 '25 19:03 rahimabdi

@rahimabdi Great! I don't think I have assigning permissions, so if you could do that for me that'd be helpful.

lolaodelola avatar Mar 15 '25 10:03 lolaodelola

@rahimabdi @cookiecrook the spec says:

Authors MUST ensure elements with role menuitem are accessibility children of an element with role menu, menubar, or an element with role group that is an accessibility child of an element with role menu or menubar.

Would it be appropriate to have a test for elements that aren't children of menu to test if their computed name is still correct - even though elements with menuitem must always be children of menu?

lolaodelola avatar Mar 21 '25 10:03 lolaodelola

@lolaodelola Were you thinking of something similar to the orphaned role tests?

https://github.com/web-platform-tests/interop-accessibility/issues/120

rahimabdi avatar Mar 24 '25 17:03 rahimabdi

Since this is a normative Author requirement, not a User Agent requirement, we can write WPT tests to check the working cases that use valid markup.

Authors MUST ensure elements with role menuitem are accessibility children of an element with role menu, menubar, or an element with role group that is an accessibility child of an element with role menu or menubar.

Would it be appropriate to have a test for elements that aren't children of menu to test if their computed name is still correct - even though elements with menuitem must always be children of menu?

Unless there is a related User Agent requirement that mandates what to do when a specific instance of these orphaned menu items have their names computed, if they do. The WPT tests can't expect UAs to do anything specific with an Author failure.

As an example, what if the orphaned menuutem fell back to a generic? Should it then have the none role (or generic role), and as such, no label?

cookiecrook avatar Mar 24 '25 23:03 cookiecrook