-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
ComboBox: Header item doesn't have aria-level set #5706
Comments
@jspurlin i'm kinda curious what we're using role=heading at all. Is that actually necessary? |
Those options are headings, they are not actionable items. According to aria 1.0, aria-level was not a required property: https://www.w3.org/TR/wai-aria-1.0/roles#heading and even in aria 1.1, it's not clear that it's required, note both 1.0 and 1.1state:
even though aria 1.1 also now has aria-level under "Required States and Properties" for role="heading" where aria 1.0 had it listed under "Supported States and Properties" (see: https://www.w3.org/TR/wai-aria-1.1/#heading) I think this is somewhat unclear on the standards part, but sure let's throw an aria-level="1" for role="heading" items... |
No, The standards are clear. 1.0 had it as supported, but 1.1 has taken that recommendation a step further by making it required. Edit: Some advice about not having multiple |
seems this is similar to #5481 |
Those headings are associated with the menu so Additionally, it's not valid to have an |
@jspurlin as a controls library should we assume that some heading has already been set on the page? Or should every control assume it starts at level 1, unless told otherwise? Options:
|
@micahgodbolt no the library should not assume there is another heading on the page. The aria-level for role="heading" is relative/contextual, in the ContextualMenu case, it is related to the levels of heading in the context of the menu, so the first level should always be marked with level 1. Take for example if someone creates a multi sectioned (e.g. leveled) menu, for example:
The aria-level should correspond to the actual level for the heading. If level for Fonts was 2 and it went up from there, a user could be confused looking for a level 1 heading that doesn't exist It looks like #5782 should be updated to reflect this |
Okay, so option # 3 then? allow user to provide starting level, and then the component increments from there? |
Yes, # 3 sounds correct |
prop name suggestion? startingAriaLevel |
I'm not opposed to either ariaLevel or startingAriaLevel, either way there should be a comment describing how it's going to be used |
Hold on -- I'm beginning to come around to having multiple |
Bug Report
Priorities and help requested:
Are you willing to submit a PR to fix? No. (But, I might when I have time)
Requested priority: Low
Products/sites affected: N/A
Describe the issue:
The ComboBox header items have role="heading" set, but it doesn't have the aria-level attribute. The Keros tool gives the following error:
Required ARIA attribute not present: aria-level
This seems to be a side effect of this PR#2495
Actual behavior:
The ComboBox header item should have aria-level attribute set.
Expected behavior:
The ComboBox header item doesn't have aria-level attribute set.
The text was updated successfully, but these errors were encountered: