Learn Accessibility by Building a Quiz - step 25

Hi !
In this lesson, we’ve learnt that we can hide elements with these propieties:

position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;

However, I thought that we could had the same result with display: none.
So do you think/know if is it equivalent or not ?

Link to the lesson:

Well the lesson description says

“There is a common pattern to visually hide text for only screen readers to read.”

What you went through in this liesson is to hide the text from screen readers only. You could not use display:hidden because it will hide the text for everyone not just screen readers

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.