When publishing legal documents in PDF format, where redactions are necessary those words will be blacked out.

If these documents were to be produced as an accessible HTML page, how would these redactions be handled? A black rectangle is a visual indicator and therefore unsuitable.


As you said the black rectangle is simply a visual indicator, so you need to give that screen reader something to see. The simplest way is to give an alternative text such as "redacted" or "this text has been redacted by person on date" whatever information it is you can give, then black out that text by changing the color visually using CSS. Like so: https://jsfiddle.net/su35fdcc/

<p> Area 51 really hides secrets about <span class="redacted">Redacted text</span> and other oddities.

   background-color: black;
   width: 200px;

Lands you with this:

enter image description here

This way, any sighted users simply see a black rectangle like you would expect. However, visually impaired users using the screen reader will come across the word and it will read "Redacted".

Tested with NVDA screen reader to make sure that it works as expected.

| improve this answer | |
  • +1 this is the conventional way to do it. Also, it's common to use square brackets in legal documents to denote text that has been changed or is different from the original copy, so [ redacted text ] is a conforming way to do this. – tohster Feb 9 '16 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.