Related to #383 and #1444
This is a very similar issue to the ones about aria-required-children on list, listbox, and tree. I can't think of a reason why menu and menubar should not be allowed to be empty as well. Two scenarios where this might happen include:
- A menu's commands are loaded dynamically when it is opened, and it does not contain menuitems when in the loading state
- There is a way to filter commands in a menu, and the user types in a string that does not match any menuitems. (This is the scenario where I'm currently running into the issue)
I generally think the aria-required-children rule makes more sense as an allowed children check across all roles where it applies, as @WilcoFiers mentioned in this comment: #1444 (comment). The comment further down notes that only menu, menubar, and row would continue to fail when empty. I understand row, but I couldn't find any reason stated in that thread why menu/menubar would require children, and I can't personally think of a reason why those would be exceptions.
This is related to the ARIA changes in #1454, but I don't think updating menu/menubar to match list, listbox, tree, etc. would need to wait on the ARIA PR (speaking of which, going to go update that now... :D)
Related to #383 and #1444
This is a very similar issue to the ones about aria-required-children on list, listbox, and tree. I can't think of a reason why menu and menubar should not be allowed to be empty as well. Two scenarios where this might happen include:
I generally think the aria-required-children rule makes more sense as an allowed children check across all roles where it applies, as @WilcoFiers mentioned in this comment: #1444 (comment). The comment further down notes that only
menu,menubar, androwwould continue to fail when empty. I understandrow, but I couldn't find any reason stated in that thread whymenu/menubarwould require children, and I can't personally think of a reason why those would be exceptions.This is related to the ARIA changes in #1454, but I don't think updating menu/menubar to match list, listbox, tree, etc. would need to wait on the ARIA PR (speaking of which, going to go update that now... :D)