Eight ways to hide text
The same sentence hidden eight different ways: from sight, from assistive technology, from both, or from neither. Which ones an extractor should return depends on what it is for, which is exactly the decision this page forces. SAMPLE wording only.
| Technique | Visible? | In the accessibility tree? | The text |
|---|---|---|---|
| Nothing (control) | Yes | Yes | SAMPLE sentence one. |
| display: none | No | No | |
| visibility: hidden | No | No | |
| The hidden attribute | No | No | SAMPLE sentence four. |
| Clipped (sr-only) | No | Yes | SAMPLE sentence five. |
| aria-hidden | Yes | No | |
| Zero opacity | No | Yes | SAMPLE sentence seven. |
| Off-screen | No | Yes | SAMPLE sentence eight. |
Every technique carries a data-hide attribute naming it, so a test can assert on each one individually rather than on the page as a whole.