@fazzaamiarso
Posted
Hi Sara! h1
element is important for screen readers. You can read about it here https://fae.disability.illinois.edu/rulesets/HEADING_1/
For sites that have no clear h1
in the design, you can still put an h1
that is hidden visually, but accessible by screen readers.
You can add this class (I borrow it from Tailwind CSS)
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
Hope it helps! Keep on coding!
Marked as helpful
@Risclover
Posted
@fazzaamiarso Cool, I'll try that. Thank you very much!