Bacancy Bacancy
      • About Company
      • Resources

      About Company

      About Us Leadership Team Customer Reviews Awards & Recognition
      Infrastructure Our Locations Partnership

      Resources

      Press Room Blog Insights
      We are great place to work certified™

      Building and Sustaining High-Trust, High-Performance Culture

      Get Quote
    • Engagement Models

      Hiring Software Developers becomes easier with just a few clicks.

      Software Development Outsourcing

      End-to-end delivery of custom solutions aligned to your roadmap.

      Staff Augmentation

      Scale your in-house team with pre-vetted specialists on demand.

      Dedicated Teams

      Get dedicated engineers who work exclusively on your project.

      • Enterprise Services
      • IT Services
      • Data Analytics
      • Cloud Services
      • AI & ML
      • Platforms

      Enterprise Services

      Digital Transformation Business Process Automation Digital Product Engineering Enterprise App Development Custom Software Development

      IT Services

      Legacy App Modernization DevOps & SRE Full Stack Development AI Testing & QA Automation

      Data Analytics

      Data Visualization & Reporting Data Engineering & Pipelines Data Science & Predictive Analytics Business Intelligence

      Cloud Services

      Cloud Strategy & Consulting Cloud Migration & Modernization Multi Cloud Management

      AI & ML

      AI Development Agentic AI Generative AI Computer Vision Machine Learning & MLOps

      Platforms

      Salesforce SAP ServiceNow Microsoft Dynamics Snowflake
      High-quality, Cost-effective IT Outsourcing

      Schedule a free discovery session to explore your needs and find tailored solutions with no obligation.

      explore all services
    • Industries
      Healthcare Fintech Real Estate
      Logistics Education Retail & Ecommerce
      Let's Grow Together! Get Quote
      • Front End
      • Backend
      • Mobile
      • Databases
      • DevOps & Infra
      • AI & Data Stack
      • Vibe Coding

      Front End

      React.js Next.js Angular Vue.js TypeScript
      Your Very Own UI/UX Architects

      Experience smooth navigation and user-friendly designs with our front-end expertise.

      Hire Frontend Developer

      Backend

      Node.js Python Java Spring Boot Laravel .NET C# Golang FastAPI
      Server Solutions To Change Power Dynamics

      Transform your data into digital experiences with optimized coding standards.

      Hire Backend Developer

      Mobile

      iOS Android Flutter React Native
      Innovating Mobile-Friendly App Solutions

      Create dynamic mobile apps that make your brand stand out from the crowd.

      Hire Mobile App Developer

      Databases

      PostgreSQL MongoDB MySQL Redis Supabase
      Dedicated Talent With Skilled Approach

      Bring your digital visions to life with a hired resource at your convenience.

      Hire Dedicated Developer

      DevOps & Infra

      AWS Azure Google Cloud Docker Kubernetes Terraform
      Redefining Scalable Digital Infrastructures

      Make your data accessible worldwide at will, and leave the stress behind.

      Get Quote

      AI & Data Stack

      OpenAI LangChain LlamaIndex Apache Spark Airflow Tableau PowerBI Databricks
      Guiding Decisions With Data-Driven Insights

      Transition from your gut calls to actionable insights with our rich Data Science expertise.

      Get Quote

      Vibe Coding

      Base44 Claude Code Cursor Lovable Github Copilot
      Your AI-Native Development Team

      Skip the boilerplate. Our vibe coding experts use AI-first tools to go from prompt to product, fast.

      Hire Vibe Coding Developer
  • Case Studies
  • Contact Us
Find a Developer book a 30 min call
      • About Us
      • Leadership Team
      • Customer Reviews
      • Awards & Recognition
      • Infrastructure
      • Our Locations
      • Partnership
      • Press Room
      • Blog
      • Insights
      • Digital Transformation
      • Business Process Automation
      • Digital Product Engineering
      • Enterprise App Development
      • Custom Software Development
      • Legacy App Modernization
      • DevOps & SRE
      • Full Stack Development
      • AI Testing & QA Automation
      • Data Visualization & Reporting
      • Data Engineering & Pipelines
      • Data Science & Predictive Analytics
      • Business Intelligence
      • Cloud Strategy & Consulting
      • Cloud Migration & Modernization
      • Multi Cloud Management
      • AI Development
      • Agentic AI
      • Generative AI
      • Computer Vision
      • Machine Learning & MLOps
      • Salesforce
      • SAP
      • ServiceNow
      • Microsoft Dynamics
      • Snowflake
    • Healthcare
    • Fintech
    • Real Estate
    • Logistics
    • Education
    • Retail & Ecommerce
      • React.js
      • Next.js
      • Angular
      • Vue.js
      • TypeScript
      • Hire Frontend Developer
      • Node.js
      • Python
      • Java
      • Spring Boot
      • Laravel
      • .NET
      • C#
      • Golang
      • FastAPI
      • Hire Backend Developer
      • iOS
      • Android
      • Flutter
      • React Native
      • Hire Mobile App Developer
      • PostgreSQL
      • MongoDB
      • MySQL
      • Redis
      • Supabase
      • Hire Dedicated Developer
      • AWS
      • Azure
      • Google Cloud
      • Docker
      • Kubernetes
      • Terraform
      • Get Quote
      • OpenAI
      • LangChain
      • LlamaIndex
      • Apache Spark
      • Airflow
      • Tableau
      • PowerBI
      • Databricks
      • Get Quote
      • Base44
      • Claude Code
      • Cursor
      • Lovable
      • Github Copilot
      • Hire Vibe Coding Developer
  • Case Studies
  • Contact Us
  • Find a Developer
  • book a 30 min call
insights on accessibility

How to Build an Accessible App With React (Why is It More Important Than Ever?)

Paridhi Wadhwani
Paridhi Wadhwani Tech Geek
Last Updated on November 13, 2024 | Written By: Paridhi Wadhwani

“Accessibility allows us to tap into everyone’s potential.”
– Debra Ruh

Debra Ruh is a Digital Accessibility Technologist, the founder of TecAccess and Ruh Global. These American companies build solutions for people with disabilities, like designing websites and online learning tools. I look-up to women like Debra, who passionately try to bring an impartial stage for everyone, and even I want to make websites that are accessible by all.

This blog is a tutorial for building an accessible website using React Js. I am going to share my knowledge that I have throughly learned. This way, more and more software developers will get to know about accessibility and how to make react-apps more accessible. So let me start with the nitty-gritty.

What is Web Accessibility?

Accessibility refers to enabling ease of computer usage for people with disability or impairment by using specialized hardware or software. It uses features like text-to-speech, closed-captioning, and keyboard-shortcuts.

The term a11y is a generic term for accessibility, which is a numeronym where 11 is the number of characters omitted between the first and last characters. Web development keeping in mind accessibility ensures the inclusion of the total population using the web.

Web Accessibility begins by inclusive design that considers every web user is equal. Say, for instance, someone who is visibly impaired and cannot use the mouse pointer or trackpad, should also have equal rights and access to your website. Hence, developers should see a11y as a mandate and not just a feature. It not only benefits people with disabilities but also for those who:

  • Use smartwatches, smart TVs, mobile phones, etc. with small display screens and different input modes
  • Have changing abilities with aging
  • Have temporary disabilities like a broken arm or lost glasses
  • Have situational limitations like bright sunlight or are in an environment where they cannot listen to audio
  • Have no internet connection or costly bandwidth usage.

Overall, accessible apps improve the website’s user experience UX by more intuitive interactions, high color-contrast, etc.

Standards and Guidelines for Web Accessibility

Here are a few guidelines developed by the W3C that govern how developers can achieve accessibility in building websites. These standards ensure that websites support screen readers, keyboard usability, and captions for images.

WCAG

The World Wide Web Consortium (W3C), in alliance with people and organizations around the globe, developed the Web Content Accessibility Guidelines, as a set of recommendations for making web content accessible for people with disabilities and all other user agents.

WAI-ARIA

W3C presented the Web Accessibility Initiative- Accessible Rich Internet Applications, which is a technical document that specifies how to improve the accessibility of webpages using Ajax, HTML, Javascript, and other related technologies like React.

Being a React enthusiast, I get annoyed when people raise myths like:

  • Is React Accessible?
  • How does the React handle the Accessibility Initiative?
  • React doesn’t support Accessibility
  • Developers should use accessible HTML instead of React
  • React makes the website inaccessible

So, I decided to write a react a11y tutorial to make your lives easier. Accessible React components, react ARIA live, react-router accessibility, and more are used to build Accessible react applications. But in this post, I am going to show you how you can make any react application accessible simply by using some standard HTML techniques.

How to improve Web Accessibility using ReactJS

Below are depicted 08 HTML practices that help in building accessible React applications:

#1 Casing and Reserved Words

Following semantic HTML is ideal for React web applications, and HTML obeys proper casing of characters. Developers should follow camel-casing for writing HTML attributes. For example,

tabindex needs to become tabIndex
maxlength turns to maxLength 

Nonetheless, all the data-* and aria-* attributes should be hyphen cased (kebab-cased) in plain HTML such as,

aria-label={labelText}
aria-required=”true”

For some reserved words like ‘for’ and ‘class’ we change them like this,

for (a reserved work in Javascript) must be written as: htmlFor
Class (another reserved word of Javascript) becomes className

#2 Set page titles

The first thing the screen readers announce is the page title, and hence setting the title of your page is an essential step of making your application accessible. Now, as all React apps are SPAs (single page apps), the title element will display the same content throughout the browser session, which is not fair.

To overcome this issue, developers can dynamically change the global document. title property every time the page loads by implementing react’s lifecycle method- componentDidMount(). Screen readers can update the contents on the user’s browser tab and announce precisely where the user is on your application. Implementing this step also benefits your website because it is excellent for Search Engine Optimization.

You can set the page title of your website like this:

componentDidMount() {

 document.title = “Updated page title is this”;

}

Alternatively, there is a plugin react-helmet that developers can use that primarily handles head tags per page or component.

#3 Use Semantic HTML

To ensure each of your HTML block code is accessible by screen readers, you must write clear and understandable code. We generally make mistakes with buttons. Instead of creating tags, we create

tags, which is not ideally correct. Though it may bring the same outputs, screen readers will not identify the later one as a button.

#4 Mandate alt text and labels

As per the WCAG 2.0 all the non-text content presented to the user has a text alternative that serves a similar purpose.

Text is the most optimal content form, so make sure that you add alt text for all the image tags and for user interfaces, you can use the labels to describe the tags and their purpose.

< img src=”cat.png” alt=”An image of a big white cat.” / >
< div role="navigation" aria-label="First list" >
 < ul >
   < li >List of states< /li >
 < /ul >
< /div >
< div role="navigation" aria-label="Second list" >
 < ul >
  < li >List of cities< /li >
 < /ul >
< /div >

#5 Use headers correctly

You should program Assistive technology used in screen readers in an orderly fashion. Hence, even we should use HTML tags like headers h1-h5 appropriately. We cannot use randomly any header tag just because its font size matches our content need. It has to obey the hierarchy.

< h1 > Main Header < /h1 >
< h2 > Main Sub Header < /h2 >
< h3 > Sub Sub Header < /h3 >

#6 Handle live announcements

How does a visually challenged user get to know when you update some data on your webpage? For example, your webpage fetches some external data from an API, how does the screen reader get to know about it?

Live announcements handle this. Let us go through an example to understand it better,

import React from "react";
class Announcements extends React.Component {
 render () {
   return (
       < div aria-live="polite" aria-atomic="true"
         className="visuallyhidden" >
         {this.props.message}
       < /div >
   );
 }
};
export default Announcements;

We have created a live announcement here. Now, the screen readers will read the text out loud for your users depending on the choice accessibility attributes aria-live and aria-atomic. Then, we need to create a state property in the parent component.

this.state({
 message: null;
});

Next, you set the message for the users.

this.setState({
 message: “New Message for you!”
});

Finally, we have to include the announcement in the parent component like this,

< Announcements message={this.state.message} / > 

#7 Use Fragments

Fragments in React, allow grouping child elements together without creating additional DOM nodes. We all know that programmers should wrap every react element within an HTML element for its correct rendering. And most developers, including me, encase all elements within div tags. Such excessive and unthought use of div tags turns out to be non-semantic HTML. Reminding once again- Semantic HTML is a must for accessibility.

Here, fragments make screen readers’ work easy. For example, this structure turns out to be non-semantic HTML,

< ul >
< div >
   < li >1. Item One < /li >
   < li >2. Item Two < /li >
 < /div >
< /ul >

Instead, you should write fragments like this:

< React.Fragment >
   < li >1. Item One < /li >
   < li >2. Item Two < /li >
< /React.Fragment >

Or else, merely writing the fragment wrapped in empty angular brackets also makes semantic HTML output for screen readers.

< >
   < li >1. Item One < /li >
   < li >2. Item Two < /li >
< / >

#8 Keyboard focus

The keyboard focus is of prime importance when implying accessibility. Also, it is of crucial precision and hence judiciously-used. When users are not able to use the standard input mechanisms, they find it challenging to get through your website. It is thus, essential to handle the most crucial input-keyboard focus.

React introduced a ref function for keyboard focus handling. It can be used as shown in the below example:

< div ref={(contentHolder) => { this.contentHolder = contentHolder; }} tabIndex="-1" aria-labelledby="pageHeading" >

Create a ref function called contentHolder on the outermost parent div. The tabIndex=-1 will allow non-focusable div to receive keyboard focus via ref

Now that we have created the ref, let’s use it along with the lifecycle method to shift the keyboard focus on page load:

componentDidMount() {
    this.contentHolder.focus();
}

This way you may handle keyboard focus.

Apart from these HTML techniques, you can also use the vast React community support and make your apps available for everyone.

Accessibility Testing and Development Tools

The React ecosystem is vast and constantly expanding. It avails many ready tools for developers. Some of the useful tools for attaining accessibility in your web app are:

  • eslint-plugin-jsx-a11y
  • This library is a linter plugin to check your code for accessibility since you start developing your website. It includes 33 testable rules that help you attain accessibility covering alt-text, and label-has-for.

  • react-a11y
  • This one is analogous to the above plugin (eslint), but it is for run-time analysis. Developers can require this module in the main application, and it will throw warnings in the console on application-rendering.

  • react-aria-modal
  • The React team recommends this modal library, which complies with the web accessibility standards. It checks if your website is accessible to screen readers and also handles keyboard focus, key mapping, and ARIA roles to ensure the same.

  • Web AIM Colour Contrast Checker
  • This tool analyzes the two colors you choose for your website and gives you a contrast ratio to meet the accessibility guidelines.

  • WAVE Browser Extensions
  • The WebAIM developed the WAVE (browser extension for firefox and chrome) in the form of community service. By using this extension, your data does not reach the server, and you can locally check any web-page for accessibility.

  • Lighthouse
  • Google came with Lighthouse, which is an automated tool for improving the quality of web-pages by auditing their performance, accessibility, SEO, progressive web apps (PWA). You can use it with Chrome Dev Tools, command line, or as a Node module.

    Upshot

    I hope this post has opened up insights on accessibility and how to attain it with React. If you have other ways to achieve accessibility, do share your suggestions in the comments section below.

    If you are looking for assistance to implement Web and Mobile Accessibility Solution for ADA, WCAG 2.1 & Section 508 Compliance, then Hire ReactJS Developer from us to create more accessible, interactive and discriminating web solution. We have certified Web Accessibility Specialist who can help you build a phenomenal website in accordance to meet your compliance goal.


Expand Your Digital Horizons With Us.

Start a new project or take an existing one to the next level. Get in touch to start small, scale-up, and go Agile.


Or
E-mail us : solutions@bacancy.com

Your Success Is Guaranteed !

Related Articles

Vivek Patel

May 11, 2026

React JS

React MCP: A Complete Guide to Building Intelligent Web Apps in 2026

By : Vivek Patel

In this guide, you will explore React MCP (Model Context Protocol), how it is rapidly becoming a standard way to...

Read More
Vivek Patel

February 20, 2026

React JS

React Server Components: Guide & Best Practices 2026

By : Vivek Patel

Read More
Dipal Bhavsar

September 23, 2025

React JS

How to Get Started with React Flow? Step-by-Step Tutorial to Build Interactive Workflows

By : Dipal Bhavsar

React Flow is a React library that builds interactive workflows and automation tools. It offers features like drag-and-drop nodes, customizable...

Read More

Offices and Development Centers

Bacancy Ahmedabad Ahmedabad

15-16, Times Corporate Park, Thaltej, Ahmedabad, 380059

Bacancy Gandhinagar Gandhinagar

422-A, 4th Floor, Pragya Tower Road 11, Block 15, Zone 1, SEZ-PA Gandhinagar, 382355

Bacancy Hyderabad Hyderabad

Awfis, Level 1, N Heights, Plot No 38, Phase 2, Hitech City Hyderabad, 500081

Bacancy Mumbai Mumbai

18th Floor, Cyberone, opp. CIDCO Exhibition Centre, Sector 30, Vashi, Navi Mumbai, 400703

Bacancy Pune Pune

2nd FloorMarisoft-1, Marigold IT Park, Pune - 411014

Bacancy Bengaluru Bengaluru

Raheja Towers, 26/27, Mahatma Gandhi Rd, East Wing, Craig Park Layout, Ashok Nagar, Bengaluru, 560001

Global Presence

Bacancy New Jersey New Jersey

33 South Wood Ave, Suite 600, Iselin NJ 08830

Bacancy California California

535 Mission St 14th floor, San Francisco, CA 94105

Bacancy Massachusetts Massachusetts

501 Boylston St, Boston, MA 02116

Bacancy Florida Florida

4995 NW, 72nd Avenue, Suite 307, Miami, FL, 33166

Bacancy London London

90 York Wy, London N1 9AG, United Kingdom

Bacancy Ontario Ontario

71 Dawes Road, Brampton, On L6X 5N9, Toronto

Bacancy Australia Australia

351A Hampstead Rd, Northfield SA 5085

Bacancy UAE UAE

One Central 8th and 9th Floor - Trade Centre - Trade Centre 2 - Dubai - United Arab Emirates

Bacancy Sweden Sweden

Junkergatan 4, 126 53 Hagersten

Get in Touch

Great Place to Work

Get in Touch

cal-icon

Looking for expert advice?

Schedule a Expert Call


  • Brochure
  • Quality Assurance
  • Resources
  • Tutorials
  • Customer Reviews
  • Privacy Policy
  • FAQs
  • Press Room
  • Contact Us
  • Sitemap
  • Employee

bacancy google review 4.6
bacancy google review
bacancy clutch review 4.8
bacancy clutch review
bacancy goodfirms review 4.8
bacancy goodfirms review
iso
  • Bacancy Behance
  • Bacancy Pinterest

Copyright © 2026 BACANCY SERVICES PRIVATE LIMITED All rights reserved.