Invisible content

Sometimes we want to hide content on websites, either visually or completely, for a variety of reasons. Getting it right is important, as hiding things with CSS can have an accessibility impact.

My personal go-to resource is Tollwerk's thorough overview of the various methods and their pros and cons (in German):

Barrierefrei Verstecken: HTML, CSS, ARIA & Co. | tollwerk

Manchmal ist es erforderlich, Inhalte einer Website dauerhaft, zeitweise oder für bestimmte Zielgruppen zu verbergen. Es exis­tieren unter­schiedliche Techniken zu diesem Zweck, und jede hat ihre eigenen Vorzüge und Auswirkungen auf die Barrierefreiheit und assistive Technologien. Wir zeigen, welche Methode sich wann besonders eignet und was daran zu beachten ist.
2021

Similar systematic evaluations of methods (with different observations on some details) are available from:

Hiding Content Responsibly | Kitty Giraudel

In this article, I want to discuss all the ways to hide something, be it through HTML or CSS, and when to use which.
2021

Unsichtbare Texte — mit HTML, CSS oder ARIA? - [barrierefreies-webdesign.de]

2018

In depth

For the ultimate analysis of hiding methods and their impact, Vincent Valentin's tabular matrix covers all aspects of any technique available:

removal techniques and implications

2021