visit
The power of the Web is in its universality.While working on my HTML and CSS curriculum project with my partner at , I learned the importance of making a website accessible to visitors and screen readers. We need to provide the user with a good way to navigate and interact with the site.Accessibility guidelines will help make sites that perform well on mobile, tablet and desktop devices, while also allowing you to deliver content to users at all levels of visual and physical ability.Here are a few tips on improving the accessibility of a website using HTML
Access by everyone regardless of disability is an essential aspect.
Tim Berners-Lee, W3C Director and inventor of the World Wide Web
1. Declare the language of your document
Declaring the correct language on an HTML page has many benefits. It is good for search engine optimization (SEO) and it also helps third-party translation tools and browsers to identify the right language and dictionary.<html lang ="en">
.....
</html>
<!-- Don't do this -->
<div> Click Me! </div>
<!-- Do this -->
<button> Click Me! </button>
3. Using h1- h6 headings are important
The document structure is everything when presenting content through assistive technology. Proper headings make the organization of the content presentable in a meaningful way and show the relationships between different sections.<h1> Heading 1 </h1>
<h2> Heading 2</h1>
<h3> Heading 3</h1>
<h4> Heading 4</h1>
<h5> Heading 5</h1>
<h6> Heading 6</h1>
You can hide content visually and from screen readers by using the
hidden
attribute. It can be used on all elements.<p hidden> I wont display on browser </p>
Using
alt
attribute on the <img> element provides an alternate text for an image if the user for some reason cannot view it either because of slow connection, an error in the src attribute or if the user uses a screen reader.If the image is purely for visual decoration or has no content value, consider embedding it with CSS as a background image. If you have/want to add it in HTML, don’t remove the alt attribute, but leave it empty.<img src = "cat.jpg" alt = "orange cat lying on it's back" >
<img src = "icon.jpg" alt = "" >
Previously published at //medium.com/@akintolarahmah/how-to-use-html-to-improve-accessibility-for-low-vision-users-b424c54ba87c