Add additional "name from content" tests for menus and tables
@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 @rahimabdi Is this issue ok for me to work on?
@lolaodelola Certainly, please feel free to assign to yourself. Thank you!
@rahimabdi Great! I don't think I have assigning permissions, so if you could do that for me that'd be helpful.
@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 Were you thinking of something similar to the orphaned role tests?
https://github.com/web-platform-tests/interop-accessibility/issues/120
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?