
FrontEnd Dev || Freelancer || Web Developer || JavaScript || ReactJS || Java || MySQL || Python || Selenium Web Driver... || Sharing My Tech Journey...
- Tweets2.4K
- Following264
- Followers219
- Likes1.6K

ALT Sometimes to improve accessibility, we need to add helper text, which should be visible to only screen readers. E.g. For icons, For logo, which is used as a primary header We can do that using this snippet: ```css .visually-hidden { /* to remove element from document flow */ position: absolute; /* Element with 0 width/height is not read by screenreaders. So, setting it to next minimum size to shrink its dimensions. */ width: 1px; height: 1px; /* content of the element will still be visible, so, hide this overflow. */ overflow: hidden; /* when content is wrapped into 1px, screen readers cannot read space between words, so keep white-space as it is. */ white-space: nowrap; /* still 1px of background-color will be visible. Use clip-path, scale or translate trasform to hide it. */ clip-path: circle(0); /* or */ /* transform: scale(0); */ /* or */ /* transform: translateX(-9999px); */ } ```








