Sujay Kundu

Web Accessibility – it’s importance and howto

You can read the Accessibility docs provided by MDN doc here –

Importance of Web Accessibility

Creating a comprehensive web accessibility guide for Frontend Developers & Architects is a crucial step in ensuring that websites and digital products are inclusive and usable for all users, including those with disabilities.

Web accessibility, also known as digital accessibility, is the practice of ensuring that people with disabilities can use and interact with digital content, including websites, applications, and other digital products. As a Frontend/UI Architect, it is important to keep accessibility in mind when designing and developing digital products.

~Here is a guide to complete web/digital accessibility for Frontend/UI Architects~

~Understanding Accessibility:~

Learn about web accessibility and its importance in creating an inclusive online environment.
Familiarize yourself with accessibility guidelines, such as the Web Content Accessibility Guidelines (WCAG), version.
Web accessibility ensures that people with disabilities can access and interact with digital content seamlessly, which can improve their quality of life and provide them with equal access to information and resources. This includes people with visual, auditory, physical, speech, and cognitive disabilities. Web accessibility is also important for aging populations and people with temporary disabilities, such as a broken arm or a temporary loss of vision. Additionally, accessibility benefits all users, including those without disabilities, by providing a more usable and inclusive experience.
1.       ~Use Accessible Design Principles:~
When designing digital products, it is important to use accessible design principles. This includes using sufficient color contrast, providing alternative text for images and other non-text content, and ensuring that interactive elements are keyboard accessible.
2.       ~Use Accessible Development Techniques:~
When developing digital products, it is important to use accessible development techniques. This includes using semantic HTML, providing appropriate headings and labels, and ensuring that form elements are properly associated with their labels.
3.       ~Web Accessibility Standards:~
There are several web accessibility standards that you should be familiar with. The most widely recognized standards are the Web Content Accessibility Guidelines (WCAG) 2.1, which are organized into three levels of conformance: A, AA, and AAA. The Americans with Disabilities Act (ADA) and Section 508 of the Rehabilitation Act of 1973 also provide legal requirements for web accessibility.
4.       ~Test for Accessibility:~
It is important to test digital products for accessibility to ensure that they can be used by people with disabilities. This can include automated testing using tools like the Web Accessibility Evaluation Tool (WAVE) or manual testing using assistive technology like screen readers.

~Full accessibility tree in Chrome DevTools

Chrome DevTools has launched a full accessibility tree making it easier for developers to get an overview of the whole tree.
In this post find out how this tree is created and how to use it in your work.
5.       ~Provide Training and Education:~
Providing training and education to team members on accessibility can help ensure that accessibility is considered throughout the design and development process. This can include providing resources and training on accessibility guidelines and standards, as well as best practices for accessible design and development.

Overall, ensuring web/digital accessibility is a critical aspect of creating inclusive and usable digital products.

As a Frontend/UI Architect, it is important to consider accessibility throughout the design and development process to ensure that all users, including those with disabilities, can use and interact with digital content.

~Semantic HTML:~
Use proper HTML elements to structure content, such as headings (h1-h6), lists, and semantic markup for images.
Avoid using divs or spans for structural purposes and use them only when necessary for styling.
~Keyboard Navigation:~
Ensure that all interactive elements on the website (buttons, links, form fields) can be accessed and operated using only the keyboard.
This means that users should be able to navigate and interact with the website using only the keyboard, without the use of a mouse or other pointing device.
Test the website’s keyboard navigation to ensure logical and intuitive tab order.
~Focus Management:~
Focus management is important for keyboard accessibility. It ensures that users can easily identify where they are on the website and navigate through the website using the keyboard. Make sure that the focus indicator is visible and clear for all interactive elements.
Avoid removing or hiding focus outlines, as it can make it difficult for keyboard users to navigate.

~Images and Alt Text:~
All non-text content, such as images, should have alternative text (alt text) that describes the content of the image. This is essential for people who use screen readers or have images turned off. Always provide descriptive alternative text (alt text) for images, conveying their purpose or content to users who cannot see them. Decorative images should have empty alt attributes (alt=“”) to be ignored by screen readers.
~Audio and Video Accessibility:~
Videos and audio content should have captions & transcripts and include audio descriptions for Video content to describe visual information and make them accessible to people with hearing impairments or have low vision.
~Color Contrast:~
Sufficient color contrast is essential for people with low vision or color blindness.
Text should have a contrast ratio of at least 4.5:1 against its background, and larger text should have a contrast ratio of at least 3:1..
Use accessible color combinations and tools to test color contrast compliance.

~Forms and Labels:~
Forms should be designed to be accessible to users with disabilities. This includes providing labels for form fields, ensuring that form elements are properly associated with their labels, and using appropriate input types for different types of form fields.
Utilize HTML’s label element and for attribute, or use the implicit label approach with semantic form elements.
~ARIA (Accessible Rich Internet Applications) Roles and Attributes:~
Use ARIA roles and attributes are used to supplement HTML to enhance the accessibility of dynamic content, such as single-page applications (SPAs) or custom widgets & provide additional information to assistive technology users. ARIA attributes can be used to define roles, states & properties of user interface elements. Be cautious not to overuse ARIA, as it may lead to confusion if used improperly.

~Screen Readers:~
Screen readers are software applications that convert digital content into synthesized speech or Braille. Some popular screen readers include JAWS, NVDA, VoiceOver, TalkBack, Windows Narrator, and ChromeVox. It is important to understand how screen readers work and how they interpret digital content.
~Accessibility Code Quality Tools:~
There are several tools available to test the accessibility of digital content. Some popular tools include aXe, pa11y, Lighthouse, and Accessibility Insights. These tools can be used to identify accessibility issues and provide guidance on how to fix them.
~Responsive Design and Text Resizing:~
Responsive design is important for accessibility, as it ensures that the website is accessible on different devices and screen sizes.
This is essential for people with disabilities who may use different types of devices to access the website.
Allow users to resize text without breaking the layout or functionality.
~Consistent Navigation:~
Consistent navigation is important for both usability & accessibility.
It ensures that users can easily navigate through the website and find the content they are looking for.
~Testing and QA:~
Conduct regular accessibility testing using automated tools like aXe, WAVE, or Lighthouse.
Perform manual testing with screen readers and keyboard navigation to identify potential issues.
Automated testing can help identify accessibility issues quickly and efficiently (solves between 35% – 40% of the issues)
However, manual testing is very important (thought it is time consuming) to ensure digital content is accessible to people with disabilities (solves upto 60% of the issues). It is recommended to use a combination of both automated and manual testing.

~Error Handling:~
Error handling is important for accessibility, as it ensures that users with disabilities can easily identify and correct errors on the website. Error messages should be clear, concise, and provide instructions on how to correct the error.
~Live Trainings for Accessibility Awareness:~
Providing live trainings to developers and designers can help raise awareness of web accessibility and provide guidance on how to create accessible digital content. Live trainings can include webinars, workshops, and hands-on training sessions.
~Separation of Responsibilities:~
It is important to separate the responsibilities of accessibility testing and remediation. Developers and designers should be responsible for creating accessible digital content, while accessibility experts should be responsible for testing and identifying accessibility issues. This separation of responsibilities can help ensure that digital content is accessible to people with disabilities.
~User Testing:~
Involve users with disabilities in usability testing to gather feedback and address specific accessibility challenges.
~Accessibility Statements:~
Include an accessibility statement on the website, explaining your commitment to accessibility and how users can request assistance or provide feedback.
~Continuous Learning:~
Stay updated with the latest web accessibility standards, techniques, and best practices.
Participate in accessibility workshops, conferences, and forums to expand your knowledge.
Remember, accessibility is an ongoing process, and it’s essential to prioritize and integrate it into the development workflow.As a frontend developer or frontend architect, it is important to be aware of these aspects and implement them to create inclusive and usable digital content. By following this guide, you can create more inclusive and user-friendly web experiences for all users, regardless of their abilities. 

~Blind users can use computers seamlessly by using a variety of assistive technologies, including:~

  • Screen readers: Screen readers are software programs that read the text on a computer screen aloud. They are the most important assistive technology for blind users, and they allow users to access all aspects of a computer, from web browsing to document editing.
  • Braille displays: Braille displays are electronic devices that translate text from a computer screen into Braille. This allows blind users to read text in a tactile format.
  • Keyboard commands: Blind users can use a variety of keyboard commands to navigate the computer and interact with applications. This allows them to avoid using a mouse, which can be difficult for blind users.
  • High-contrast keyboards: High-contrast keyboards have keys that are easy to see and distinguish, which can be helpful for blind users.
  • Voice recognition software: Voice recognition software allows blind users to control the computer by speaking commands. This can be a helpful alternative to using a keyboard or mouse.
    ~In addition to these assistive technologies, there are a number of things that web developers can do to make their websites more accessible to blind users.~

This includes:

  • Using clear and concise language
  • Using descriptive alt text for images
  • Using headings and labels to structure the content of a page
  • Avoiding using color as the only way to convey information
  • Testing websites with screen readers
    By following these guidelines, web developers can help to ensure that blind users can access and use their websites seamlessly.

~Here are some additional tips for making websites more accessible to blind users:~

  • Use a consistent layout and navigation structure throughout your website. This will make it easier for blind users to find their way around.
  • Use clear and concise language. Avoid using jargon or technical terms that blind users may not be familiar with.
  • Use descriptive alt text for all images. This will allow blind users to understand the content of images.
  • Use headings and labels to structure your content. This will help blind users to understand the hierarchy of information on a page.
  • Avoid using color as the only way to convey information. Blind users may not be able to see the colors on your website, so you should use other methods to convey information, such as text or braille.
  • Test your website with screen readers. This will help you to identify any accessibility issues that need to be addressed.
    By following these tips, you can make your website more accessible to blind users and ensure that they can enjoy all of the content that you have to offer.

Aria Attributes

The aria-required attribute indicates that user input is required on the element before a form may be submitted.

Create a Accessible form

Here are some key steps to make a form accessible in HTML, with a focus on JavaScript:

  • Use Semantic HTML Elements: Start with using semantic HTML elements like , , , and . These elements provide a clear structure for assistive technologies and improve accessibility.

Using Semantic Advantages:

1 Easier to develop with — as mentioned above, you get some functionality for free, plus it is arguably easier to understand.
2 Better on mobile — semantic HTML is arguably lighter in file size than non-semantic spaghetti code, and easier to make responsive.
3 Good for SEO — search engines give more importance to keywords inside headings, links, etc. than keywords included in non-semantic divs, etc., so your documents will be more findable by customers.

  • Label Your Form Elements: Every form element should have a corresponding . Use the for attribute in the tag to associate it with the id of the form element. This helps screen readers announce the purpose of the input field.
<label for="name">Name:</label>
<input type="text" id="name" name="name" />

Use ARIA Attributes

The Accessible Rich Internet Applications (ARIA) attributes can enhance the accessibility of your form elements. For example, you can use aria-label to provide a custom label for elements, or aria-described by to point to additional information about the field.

<input type="text" aria-label="Enter your name" />
  • Provide Valid and Descriptive Form Fields: Use appropriate input types like type=“text”, type=“email”, or type=“password” to help users and assistive technologies understand the expected input.
  • Use Placeholder Text Sparingly: Avoid relying solely on placeholder text for instructions, as it may disappear when users start typing. Instead, use elements for clear instructions.
  • Use Fieldset and Legend: For grouped form elements, use the and elements to provide a coherent structure. This is especially useful for forms with multiple sections or related fields.
  <legend>Contact Information</legend>
  <!-- Your form fields go here -->

Keyboard Accessibility: Ensure that all form elements can be easily navigated and interacted with using a keyboard alone. Test the tab order and add keyboard event handlers as needed.

  • Validation and Error Handling: Implement client-side validation and provide clear error messages that can be read by screen readers. Use ARIA roles like role=“alert” for error messages.
  • Testing: Regularly test your accessible form using screen readers and other assistive technologies to ensure that it functions correctly.
  • Documentation: Document the accessibility features of your form in the code or as part of your project documentation, so other developers can maintain and improve it.

Remember, web accessibility is an ongoing process, and it’s essential to stay updated with the latest accessibility guidelines and best practices. By following these steps, you can create web forms that are inclusive and user-friendly.