Accessibility in Web Development
Accessibility in web development means making web sites easy for everyone to use.
Sound bland? The keyword here is everyone. With an emphasis on people living with limited physical and/or cognitive abilities. Because for people living with disability, technology makes essentials possible.
“Accessibility allows us to tap into everyone’s potential.” ― Debra Ruh
Doing Accessibility in Web Development
Okay, this makes sense. But how can I do accessibility in my code? If you want to know this and you have basic knowledge of HTML and CSS, you’re on the right boat. Let’s go.
Semantic HTML
Semantic HTML is HTML that is focused on the meaning of content being marked up, not just on its presentation. Let me bring this home with an example:
In the above examples, both codes display the same content. But the second one implements semantic HTML. As we go on in this article you’ll understand exactly what this means and why it’s important.
How does semantic HTML help Accessibility?
Screen readers aid people living with limited vision navigate and understand web content using semantic HTML.
For instance, when a screen reader gets to a paragraph properly marked up with the tag <p>, it will inform the user that this is a paragraph before it reads the text content in it, but it won’t usually do this if the correct tag is not used.
Most screen readers also aid users to navigate web content on a site using headings, so increasing the font size of text to represent headings doesn’t cut it. Using proper heading tags (<h1>, <h2>,…) is better for accessibility.
Get Miracle Ufodiama (U.F.O.)’s stories in your inbox
Join Medium for free to get updates from this writer.
Some guidelines for writing Semantic HTML:
- Find and use proper HTML tags for markup: We’ve already talked about using heading and paragraph tags for headings and paragraphs. So, let’s learn about some that get mixed up, right now. <em> and <i>, both of these present text in italics but a screen reader would notify the user that text within <em> is important. The same goes for <strong> and <b>, the former is announced as stating something of importance while the later only makes the text bold with no semantics attached. Others include the <blockquote> (used to specify a quotation),<abbr> (used to nest an abbreviation. This could be very helpful to people with cognitive disability),<ul> (used to specify a list of items), <li> (used to markup an item on a list).
- Create Layouts with Semantic HTML: This entails creating web layouts with some HTML5 tags introduced for semantics' sake. These tags include the <nav> (used to hold navigational items),<header>(used to hold introductory content for a section or the whole document, most times <nav> is placed inside it),<main> (specifies the main content of the web page),<article>(specifies an independent block of content),<section> (mostly used to hold parts of the content in <article> and to specify a new block of content in <main>) and the <footer> (describes a footer for the document).
- Text Alternatives: Make sure every non-textual content on the web page has a text alternative. For videos, a transcript could be added, and for images an alternative text using the alt attribute or <caption> tag can be used. Other options for adding text alternatives to multimedia can be found here.
Using CSS for Accessibility in Web Development
CSS should enhance user experience.
When choosing color schemes, it is recommended to use good contrast and to style important text well, so things on the screen can be viewed clearly even with limited vision.
It’s also helpful for people with low motor skills that you make navigatable icons larger or with ability to zoom in.
Keeping navigation simple is also great for user experience.
Using JavaScript for Accessibility on the Web
For frontend development, JavaScript should only be used to add functionality to a website. Using JavaScript to generate everything from HTML markup to styling, may bring up unexpected problems that will detract from user experience.
Also, fixing HTML issues with JavaScript is always a bad idea. For example, the button tag, <button> has some inbuilt functionalities, not using it when needed, and instead using CSS and JavaScript to create a button, could bring up user interaction issues and make your code messy and is not recommended.
“The one argument for accessibility that doesn’t get made nearly often enough is how extraordinarily better it makes some people’s lives. How many opportunities do we have to dramatically improve people’s lives just by doing our job a little better?” ― Steve Krug
Conclusion
"The Web is fundamentally designed to work for all people, whatever their hardware, software, language, culture, location, or physical or mental ability. When the Web meets this goal, it is accessible to people with a diverse range of hearing, movement, sight, and cognitive ability." (W3C - Accessibility)
And in this lies the power of the web.
I believe this article will help you implement accessibility in your development, and become a better advocate for a more universal, inclusive web.







