-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add separator to the required owned elements list of menu #1844
Comments
The problem is that a menu must contain menuitem/-radio/-checkbox or group (unless empty menus are also allowed), but a separator is allowed but not required. It would be useful if the entire ARIA specification specified required and allowed child/parent roles for all roles. |
This may be resolved with @smhigley's work on revising owned elements. Agree with JAWS-test's initial response though that separator is not "required". arguably, it may be better to group menuitems by use of role=group encapsulation rather than including separators... those could be done via styling, since arguably they should not even be discoverable to users who would (at-dependent) be in forms mode when navigating the menuitems |
I agree with @WilcoFiers here; I have an interpretation to offer. In its simplest form, we've long since taught to code a navigation like this: <nav>
<ul>
<li>...</li>
<li>...</li>
</ul>
</nav> and to use <nav>
<ul>
<li>...</li>
<li>...</li>
<li role="separator">...</li>
<li>...</li>
<li>...</li>
</ul>
</nav> I would expect separator to require being owned by a list/menu/menubar. While they (list/menu/menubar) do not require owning a a separator, a separator does require being owned by one of them. Referencing, explicitly, this excellent guide for creating navigations: https://adrianroselli.com/2017/10/dont-use-aria-menu-roles-for-site-nav.html The proffered examples on the APG site are really super overdone; if there are cases where that kind of markup is genuinely required, those instances should be very clearly marked as such. But they're just overkill. |
@MelSumner your example of how to use a separator in a list would presently (correctly) return errors from conformance checkers (maybe don't disable this, per your linked PR?). Not saying it isn't something to consider to allow, I actually created this test case back in October, thinking i might open an issue with HTML to allow |
It's not |
The
menuitem
,menuitemcheckbox
, andmenuitemradio
descriptions say the following:While it isn't explicit, presumably this means that
separator
should be in the list of required owned elements formenu
. Happy to open a PR for this is if people think this is right.The text was updated successfully, but these errors were encountered: