Building UIs - By the People, for the People!

Rate this content
Bookmark

What if you get to know that your UI is not usable to roughly 20% of the world? And also you might be sued due to it in many countries? It's normal to get terrified but thanks to a concept called accessibility that we can resolve this and make our UI more reachable and in a much exciting way with this talk!

This talk has been presented at JSNation 2022, check out the latest edition of this JavaScript Conference.

FAQ

Nikhil's talk focuses on building accessible user interfaces in web content, ensuring that all users, regardless of disabilities, can access and utilize features seamlessly.

WCAG stands for Web Content Accessibility Guidelines, which are a set of guidelines and checklists to make web apps accessible. WAI, or Web Accessibility Initiative, provides APIs to help developers meet these guidelines.

Keyboard accessibility ensures that users who cannot use a mouse, whether due to vision or motor disabilities, can navigate and interact with web applications using keyboard inputs alone.

Developers can improve accessibility by using semantic HTML tags, ensuring keyboard navigation, implementing ARIA roles and attributes, and customizing focus styles to enhance user interactions.

Nikhil aims to debunk myths such as accessibility being only for people with disabilities and the misconception that implementing accessibility is overly difficult.

Nikhil recommends using screen readers, keyboard navigation, and other assistive technologies, as well as following the Web Content Accessibility Guidelines (WCAG).

Using correct HTML tags helps screen readers and other assistive technologies understand the structure and elements of a page, improving the overall accessibility of the web content.

Accessibility ensures that all users, including the 15% of the global population with disabilities, can fully engage with web applications, making technology inclusive and equitable.

Nikhil Sharma
Nikhil Sharma
22 min
20 Jun, 2022

Comments

Sign in or register to post your comment.

Video Summary and Transcription

This talk focuses on the importance of accessibility in building user interfaces, discussing WCAG and WAI. It emphasizes the use of correct HTML tags for accessibility and provides practical tips for improving accessibility in apps. The talk also highlights the significance of keyword accessibility and the use of semantic HTML. It covers navigation techniques, such as ARIA tags and breadcrumbs, and emphasizes the importance of internationalization. The demo showcases the improvements made to a login app after applying accessibility practices.

1. Introduction to Accessibility and WCAG

Short description:

I'll be talking about building UIs by the people for the people. Accessibility guarantees equality of consumption of a user interface regardless of disability. We'll discuss web content accessibility and the importance of accessibility in the real world. Two important concepts are WCAG (Web Content Accessibility Guidelines) and WAI (Web Accessibility Initiative, Accessibility Rich Applications).

Hey everyone, hope you all are having a great day. So I'll be talking about an interesting topic that's building UIs by the people for the people. So before diving in, for those who don't know me, I'm Nikhil, I'm a software engineer at Postman, I mostly handle stuff around Postman on the web, Postman's desktop platform and the Xen system at Postman. So I'll be there, you can connect with me via Twitter or GitHub. Come say hi, would love to have a chat.

All right. So before diving in, let's understand a small analogy, which I really like when introducing a concept like accessibility thing. So imagine if there's a constitution of a country, it guarantees the citizen some rights, let's say there's a right to education, there's right to religion, and there's also a right to expression. So stuff like that. Taking that just out of the example of a constitution of a country, we can say that like the constitution is the one that guarantees an equality of stature, regardless of what the background of a person is. Now when it comes to accessibility, we can make some changes to the statement. Now the statement can say that all right, accessibility also does the same thing. It guarantees us an equality of consumption of a user interface, regardless of what the disability of a person is. So simple things, simple put. Accessibility just means that if I have a product or a service, accessibility would allow a person, regardless of any sorts of disability that he or she might have, to access the product and use all its features in a seamless experience.

So, in our case, we'll be restricting this talk to only web content accessibility, but accessibility is like a far wider topic. We use many tools to have accessible experience for our users, which is like using screen readers, which can help us announce what is there on the screen for people who have vision, like a problem with vision. There's keyboard navigation so that the ones who don't have a mouse or have a problem with having a steady hand over their mouse cannot use it directly. So, there's keyword accessibility for that. But we'll discuss more about it once we progress with the talk.

So, going ahead, you might already know that we already have accessibility there in the real world, right? So, for ones who have a problem with walking, we have wheelchairs for them so that they can go around. We have a stick invented for people who have a problem with their vision, or even we have braille scripts so that people who have problems with vision can read clearly. So, if accessibility has so much of its importance been realized in the real world, so why would a JS world be left behind, right? So, with this thought in hand, let's see two important concepts before progressing with the talk.

So, on the left, you'll be able to see there's WCAG. Now, this term means Web Content Accessibility Guidelines. Now, this is nothing fancy, but just a set of guidelines and checklists that have been put together by a group of people around the world, and these checklists help people make the content inside their apps more accessible and like more reachable to any sorts of people with any disability. Now, on the right is just a subset of this WCAG, which we say WAI, which stands for Web Accessibility Initiative, Accessibility Rich Applications. Now, what they say is that, okay, you want to meet WCAG guidelines, now, okay, I have some APIs so that you can use in your code and you can meet those guidelines. So, we already know that there are many such accessibility APIs like this, there's ARIA invalid, which says that, okay, screen readers will know that once an input is invalid, they can announce that on the screen. There's ARIA required to announce on the screen that, hey, you're on an input which requires a feed.

2. Importance of HTML Tags for Accessibility

Short description:

We'll discuss the importance of using the correct HTML tags for accessibility. 15% of the world's population has some form of disability, making accessibility crucial. Accessibility is not just for disabled people; it also caters to other disabilities, such as not having a mouse. Accessibility is not as hard as it seems, and there are many practices to make apps more accessible. This talk aims to provide a deeper understanding of accessibility and practical tips for getting started. The first tip is to use the right HTML tags, which helps screen readers deliver the correct context and eliminates the need for manual ordering of elements.

So, there's stuff like that. And we'll see more about it in the coming slides, but yeah. Just one thing to keep a note of in mind is like, especially, this is like especially related to the JSX or the React world that we have this sort of an like a mental model that we have a camel case for every prop, but that's not the same with accessibility. So, with these accessibility attributes, we just have to use them as it is, that you have been using with HTML, which is like a hyphen separated values and not with a camel case. So, just a small tip there.

And moving on to like why we should care about accessibility. Now, the very first and the foremost reason is you might be surprised to know that 15% of the world's population has some sort of disability. So, if you're not making our apps accessible, that means 15% of a big chunk of our audience, which is like, which is a number that we can't ignore, cannot use our apps in the way that we want, right. And second thing is like if we have, like, if we have a application that is being going to use like in multiple countries, it's like, has a reach over like, like the whole world. We might want to like, see that there are countries which really, like, you can still give importance to accessibility and like the people who are like having, they have some disability. For example, there was like a very recent case, right, which we all know, regarding the Domino's website where we, according to the Americans Disability Act, it was not compliant to the accessibility practices that should be there. So if you are getting a website and you are going to go pan world, make sure to have these things in mind. All right.

So with this talk, we're going to bust up some myths for accessibility. For example, accessibility is just for disabled people. I wouldn't say that because disability can also mean if someone does not have a mouse, that's also a disability. Like if you show a loader on a screen when something is still being fetched, that's also an accessible experience that they're giving to users. So the deeper meaning of accessibility is to cater to any sorts of disability and rather not just physical disability. So that's just a subset. And second is that accessibility is hard. I think we're going to see this at the end of this talk that no it's not and accessibility is also not just about like blatant aria and there's like, 10 or more practice that you can do so that our apps become more accessible. And yes, this talk is not an accessibility primer. This is not just a theory class. I would want to like make this more and more inclusive and like more demo driven so that after this talk, we take a key takeaway of like what the deeper meaning of accessibility is and how we can get started without reading those big, big blogs on the internet, right? All right.

So with all these thoughts in mind, let's get started. So the first and foremost tip that I give to everyone is using the right HTML tags, which usually wins up most of the battle for us for accessibility. Now, when we use the right HTML tags, our screen readers use that information to deliver the right context over like, what is there on the screen? For example, if you're using a button HTML that the screen readers can tell people that, okay, this is a button. And it also like these HTML tags also give you like some wins big day. For example, you don't have to handed, having order of like your buttons or like inside a farm, if you're using many input elements, you don't have to think about like, what should be tapped first? What should be tapped last? What measure is a focus like first or not? So this is like all baked in. Once you do use the right HTML and also accessibility can also, like, if you want to extend this definition of accessibility, you have your peers who are using the same HTML structure in their daily code base.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Accessibility at Discord
React Advanced Conference 2021React Advanced Conference 2021
22 min
Accessibility at Discord
This Talk discusses the accessibility efforts at Discord, focusing on keyboard navigation and the challenges faced with implementing focus rings and outlines. The speaker showcases a unified focus ring system and a saturation slider to address accessibility concerns. They also highlight the implementation of role colors and the use of CSS filters for accessibility improvements. The Talk concludes with insights on runtime accessibility checking and the development of a performant core runtime system for checking accessibility issues.
Configuring Axe Accessibility Tests
TestJS Summit 2021TestJS Summit 2021
30 min
Configuring Axe Accessibility Tests
Top Content
AXe is an accessibility engine for automated web UI testing that runs a set of rules to test for accessibility problems. It can be configured to disable or enable specific rules and run based on tags. Axe provides various options, but axe linter does not support all options. The importance of investing time and resources in accessibility is emphasized, as it benefits not only those with disabilities but improves the web for everyone. Manual testing is also highlighted as a necessary complement to automated tests for addressing accessibility issues.
Nested Interactive Elements: An Nightmare in Accessibility
React Advanced Conference 2023React Advanced Conference 2023
23 min
Nested Interactive Elements: An Nightmare in Accessibility
Watch video: Nested Interactive Elements: An Nightmare in Accessibility
Nested interactive elements can cause accessibility issues on websites, and the speaker shares a personal experience with an accessibility bug involving a list component. Mitigating nested interactive structures involves limiting these patterns during development and restructuring existing elements. The speaker provides recommendations for improving accessibility, such as adjusting role properties and gathering user feedback. The conclusion emphasizes the importance of accessible solutions and encourages sharing resources to build more inclusive experiences.
Dialog Dilemmas and Modal Mischief: A Deep Dive Into Pop-Ups
JSNation 2023JSNation 2023
10 min
Dialog Dilemmas and Modal Mischief: A Deep Dive Into Pop-Ups
The Talk discusses the use of dialogues and popovers in web development. Dialogues can be modal or non-modal and are now accessibility-supported. Popovers are versatile and can be added to any element without JavaScript. They provide suggestions, pickers, teaching UI, list boxes, and action menus. Modal and non-modal dialogues and popovers have different behaviors and dismissal methods. Browser support for these features is expanding, but there are still open questions about positioning, semantics, and other use cases.
a11y and TDD: A Perfect Match
JSNation 2022JSNation 2022
24 min
a11y and TDD: A Perfect Match
This Talk explores the intersection of accessibility and test-driven development (TDD) in software development. TDD is a process that involves writing tests before writing production code, providing a safety net for code changes. The Talk demonstrates how to apply TDD principles to real-life examples, such as filling out a form, and emphasizes the importance of user-centric testing. By using atomic design principles, code can be organized in a clean and easy way. The Talk also discusses the use of labels and test IDs in tests for improved accessibility.
How to do Good Without Doing Anything
React Advanced Conference 2021React Advanced Conference 2021
32 min
How to do Good Without Doing Anything
Accessibility is about making sure everyone can participate on the web, regardless of disability. Automated tools like Lighthouse and React Axe help identify accessibility errors and provide guidance on fixing them. Unit tests validate ARIA attributes and keyboard navigation, while integration and end-to-end tests focus on outcomes and simulate user experiences. Cypress.io is an open-source testing framework with excellent accessibility support. Implementing small changes leads to a deep understanding of web accessibility and bug resilience.

Workshops on related topic

Web Accessibility for Ninjas: A Practical Approach for Creating Accessible Web Applications
React Summit 2023React Summit 2023
109 min
Web Accessibility for Ninjas: A Practical Approach for Creating Accessible Web Applications
Workshop
Asaf Shochet Avida
Eitan Noy
2 authors
In this hands-on workshop, we’ll equip you with the tools and techniques you need to create accessible web applications. We’ll explore the principles of inclusive design and learn how to test our websites using assistive technology to ensure that they work for everyone.
We’ll cover topics such as semantic markup, ARIA roles, accessible forms, and navigation, and then dive into coding exercises where you’ll get to apply what you’ve learned. We’ll use automated testing tools to validate our work and ensure that we meet accessibility standards.
By the end of this workshop, you’ll be equipped with the knowledge and skills to create accessible websites that work for everyone, and you’ll have hands-on experience using the latest techniques and tools for inclusive design and testing. Join us for this awesome coding workshop and become a ninja in web accessibility and inclusive design!
Automated accessibility testing with jest-axe and Lighthouse CI
TestJS Summit 2021TestJS Summit 2021
85 min
Automated accessibility testing with jest-axe and Lighthouse CI
Workshop
Bonnie Schulkin
Bonnie Schulkin
Do your automated tests include a11y checks? This workshop will cover how to get started with jest-axe to detect code-based accessibility violations, and Lighthouse CI to validate the accessibility of fully rendered pages. No amount of automated tests can replace manual accessibility testing, but these checks will make sure that your manual testers aren't doing more work than they need to.
Web Accessibility in JavaScript Apps
React Summit 2022React Summit 2022
161 min
Web Accessibility in JavaScript Apps
Workshop
Sandrina Pereira
Sandrina Pereira
Often we see JavaScript damaging the accessibility of a website. In this workshop, you’ll learn how to avoid common mistakes and how to use JS in your favor to actually enhance the accessibility of your web apps!
In this workshop we’ll explore multiple real-world examples with accessibility no-nos, and you'll learn how to make them work for people using a mouse or a keyboard. You’ll also learn how screen readers are used, and I'll show you that there's no reason to be afraid of using one!
Join me and let me show you how accessibility doesn't limit your solutions or skills. On the contrary, it will make them more inclusive!
By the end, you will:- Understand WCAG principles and how they're organized- Know common cases where JavaScript is essential to accessibility- Create inclusive links, buttons and toggleble elements- Use live regions for errors and loading states- Integrate accessibility into your team workflow right away- Realize that creating accessible websites isn’t as hard as it sounds ;)