Skip to content
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

Dialog[Accessibility]: Required ARIA Attribute "aria-level" not present #5481

Closed
Hardhik opened this issue Jul 9, 2018 · 4 comments · Fixed by #5782
Closed

Dialog[Accessibility]: Required ARIA Attribute "aria-level" not present #5481

Hardhik opened this issue Jul 9, 2018 · 4 comments · Fixed by #5782

Comments

@Hardhik
Copy link
Member

Hardhik commented Jul 9, 2018

https://developer.microsoft.com/en-us/fabric#/components/dialog

Click on the open dialog. If you run any Accessibility tools, we can see the error:
"Required ARIA attribute not present: aria-level"

This is error is coming for the dialog's title
image

For the element with role as heading, setting the aria-label="1" should fix this issue.

@dzearing
Copy link
Member

dzearing commented Jul 9, 2018

hmm @cschlechty and @JasonGore aria-label="1" seems like the wrong fix to me; what do you think? I'm a bit confused here. The markup in question:

          <p className={classNames.title} id={titleId} role="heading">
            {title}
          </p>

What should be done here? We could pipe title into aria-label, or we could expose titleAriaLabel but it's not obvious about why this should exist, if the element content is sufficient.

@JasonGore
Copy link
Member

According to ARIA heading role guidelines, roles of type heading that have logical outline require aria-level. I haven't found a clear definition for logical outline so my best guess here is that it's caused by heading being a child of dialog.

In any case, ARIA defines aria-level as a value greater than or equal to 1.

Assuming dialogs are considered root level, DOM hierarchy level in this case is accurate, so if there is an easy way to specify that number (nested level of the heading element), that would probably be the best fix.

@cschlechty
Copy link
Member

There should be an aria-level for anything with role="heading". Since it's in page, and not iframed, it should at best be level 2.

@micahgodbolt
Copy link
Member

@cschlechty is this something we should simply set at level 2? Or will there be opportunities where people need to change this? Same goes for other areas that we use role="header" (like the linked combobox issue)

@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants