Las distintas formas de esconder el contenido en el navegador

En Inclusively Hidden:

There are various ways to hide content in web interfaces, but are you aware of the different effects they have on the accessibility of that content? While some might think it’s strange to have multiple different ways to hide content, there are certain benefits that each method provides.

There have been many articles written about hiding content, and this post will cover some of the noted methods, and purposefully ignore others. This article will highlight the methods of hiding content that are most appropriate for modern web development, and note the accessibility impacts of each.


To wrap this all up…

Let’s do a quick recap:

  1. There are three categories of hidden content:
    1. Completely Hidden.
    2. Visually Hidden.
    3. Only Hidden from Assistive Technology.
  2. Depending on the type of content, you will need to use an appropriate technique to hide it, via:
    1. Using CSS or [hidden] to hide content completely.
    2. Using visually-hidden / sr-only classes to visually hide content, but keep it available for assistive technologies.
    3. Or using aria-hidden="true" to hide content specifically from screen readers.

Going back to my initial question “why are we hiding content?”, it’s apparent that there are some elements of a UI that truly need to be hidden. And while we have techniques to hide content, but still make it accessible for assistive technology users, I wouldn’t necessarily jump to these techniques as design solutions.

The goal should be to craft interfaces and experiences that are accessible and understandable to as many people as possible. Not to create interfaces where we can shoe horn in additional context by visually hiding it by default.


Entradas populares de este blog

accessiBe, la herramienta mágica

Las cinco reglas de ARIA