aria-hidden vs. hidden

InstructorLindsey Kopacz

Share this video with your friends

Send Tweet

In this exercise, we will be going over 2 examples of when to use aria-hidden (hint: decoration) and when to use hidden.

In the first example, we will be hiding a "middle dot" that we have for formatting. This middle dot isn't necessary to be read out, so we add an aria-hidden attribute on that span.

When we use hidden, we will completely hide things from the viewport AND the screen reader.