Skip to main content
All CollectionsAccessibility HelpARIA
Learn about ARIA Hidden and Focusable Elements
Learn about ARIA Hidden and Focusable Elements

Foundational information on aria-hidden and focus.

Updated yesterday

What is aria-hidden?

The aria-hidden attribute is a property that indicates whether an element is visible or hidden to assistive technologies such as screen readers. When set to "true", it hides the element from assistive technologies while remaining visible to sighted users.

The following code snippet shows how this attribute may be used:


<div aria-hidden="true">

This content is hidden from assistive technologies.

</div>

While aria-hidden="true" can be useful for hiding decorative or redundant content from assistive technologies, its misuse can lead to accessibility issues. Important content hidden with this attribute may become inaccessible to users who rely on screen readers.

What is a focusable element and why does it matter?

Web visitors who utilize a screen reader typically rely on a keyboard to tab through a page versus scrolling through the page using a mouse. Other users may also prefer using a keyboard over a mouse for speed or simply because of limitations of access to a mouse.

Maintaining a visual tab focus is important so that web visitors utilizing a keyboard for browsing know where they are within the page's content. The tab focus will often allow users to click on links to navigate throughout a website.

Tab focus can appear lost if the focus goes into a menu that expands when it is collapsed. Tab focus can also appear lost if the focus goes to an element within a slideshow when the element is not currently the one displayed on the screen. Simply put, tab focus appears lost whenever a user can tab to something not displayed on the screen.

How can I check for this error myself?

A simple way to test tab focus is to tab through a webpage and verify that you are never taken to an element that is not displayed on the webpage.


Resources

Learn more with WCAG

DubBot flag: Ensures aria-hidden elements are not focusable nor contain focusable elements

If you have questions, please contact our DubBot Support team via email at help@dubbot.com or via the blue chat bubble in the lower right corner of your screen. We are here to help!

Did this answer your question?