Skip to main content

aria-hidden-body

Ensures aria-hidden="true" is not present on the document body.

Severity: Critical

Description

The attribute aria-hidden="true" must not be used on the <body> element.

Why is it important?

Websites need to be accessible for users who use assistive technologies for navigating through them.

Any content that is visible to a sighted user must also be equally accessible to a user with low vision.

In some browsers, if the attribute aria-hidden="true" is used on an element, the element along with all its children gets hidden from assistive technologies. While users can still use the keyboard to focus on any focusable element, screen readers would no longer announce the contents if aria-hidden="true".

Examples

  • Success:

    • The attribute aria-hidden="true" is not applied to the <body> element. Instead, required inactive elements are removed from the tab order.
  • Failure:

    • On a webpage that contains a modal, aria-hidden="true" is added to the <body> element to hide the underlying page content when the dialog is open. In this process, all page content, including the modal dialog, would be hidden from non sighted users relying on assistive technology to traverse through a webpage.

How to fix?

  1. Remove aria-hidden="true" from the <body> element.
  2. Do not use aria-hidden="true" on a parent element and aria-hidden="false" on a child element.

Tags

cat.aria, wcag2a, wcag412

References

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy