Accessible Component System Through Customization

Rate this content
Bookmark

Most current UI libraries provide great user experience with a vast of components. But when it comes to heavy customization, and non-standard scenarios, especially for E-Commerce, they become hard to manage, scale or even slow down performance.


How to create a UI library that provides users the most possible freedom in customizing components, while keeping our performance and scalability to the fullest? How much accessible we can provide out of the box to our users? How much customization freedom is enough?


That's what my talk's about.

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

FAQ

Maya Chavin is a Senior Software Engineer at Microsoft who also writes books on component design and related technologies.

A UI component library is a collection of reusable, stylable, customizable, and accessible UI components that can be used across different projects to ensure visual and functional consistency.

Accessibility is crucial in a component library to ensure that all users, including those with disabilities, can interact with the components. This includes making components keyboard navigable, focusable, and responsive across different devices and screen sizes.

The key categories to consider are customizability, scalability, accessibility, and ease of use.

To make a dialog component accessible, ensure it auto-focuses on the first focusable element, can be closed using the Escape key, and restores focus to the element that triggered the dialog when it is closed.

Best practices for accessible tooltips include using focus events instead of hover events to display the tooltip, and avoiding placing interactive elements like links inside the tooltip.

Using 'div' elements unnecessarily can make it difficult for screen readers to understand the structure and purpose of the content. Instead, use more semantic HTML elements like 'nav', 'section', 'button', etc., which provide better accessibility.

Automated tools like Accessibility Insights for the web and libraries from the XCore team can help check for accessibility issues by scanning web pages and providing detailed reports on compliance.

To convince higher-ups, demonstrate the importance of accessibility through examples, such as showing how inaccessible designs impact users. Highlight the potential business benefits, like increased user base and compliance with legal standards.

Good documentation is essential for a component library as it helps developers understand how to use and implement the components correctly. It should be clear, concise, and include examples and accessibility tips.

Maya Shavin
Maya Shavin
30 min
01 Jun, 2023

Comments

Sign in or register to post your comment.
Video Summary and Transcription
The Talk discusses the importance of building an accessible UI component library, focusing on reusability, customizability, and responsiveness. It emphasizes the need for visual and functional consistency when developing components and highlights the key aspects of accessibility, including keyboard navigation, contrast, and content structure. The Talk also covers the building of accessible dialogues and provides tips for enhancing user experience. It emphasizes the significance of documentation, scalability, and customization in component planning. The Talk concludes by discussing the use of ARIA, accessibility testing, and strategies for persuading organizations to prioritize accessibility.

1. Introduction to Accessible UI Component Library

Short description:

You know what? I'm still... I need to recover a bit from the whole night of getting a Switch. This is my new motto now, Accessibility will bring you a Switch. We talked about UI component library. What defines a component in a component library? It has to be reusable, stylable, and customizable. Accessibility is something very hard and not relevant to component library at all, but this is the wrong thing. It also means that you have a website that looks good on desktop, mobile, and any device, screen view port, 200, 400 percent, everyone nowadays needs Zoom anyway, and that comes down to responsiveness.

[♪ music ♪ & crowd cheering ♪ You know what? I'm still... I need to recover a bit from the whole night of getting a Switch. Even though I know I will not use it, I don't know who will use it.

Anyway, how you doing, everyone? Are you having a good time? Yes! And you know what? This is my new motto now, Accessibility will bring you a Switch. Okay. That is my goal, to talk about accessible components. Let me take a bit of water. Excuse me. Woo, okay. Come.

So, quickly about me, because we have 20 minutes, so I don't have time to talk about me a lot, I'm Maya Chavin, I'm a Senior Software Engineer in Microsoft, and yes, I'm not going to fix the window for you, so don't expect it. And I'm also write books, I have more to view, react, anything about component design, you can follow me, or you can also try my book for free.

Anyway, so we talked about UI component library. How many people here ever use a UI component in their life? Oh, that's a lot. How many of you ever write a component library? Wow, that's good. That's exactly what I expected, because if you don't raise your hand, meaning either you don't do your work properly, or you don't write any frontend code, and you probably shouldn't be.

Anyway, what exactly is a component library? What defines a component in a component library? First of all, it has to be reusable, meaning if you have a sidebar, it has to be able to display a menu or a card. You can reuse it in many ways, but the functionality stays the same. It has to be stylable, meaning you have a toast notification. It can be styled in different colors and different stylings in order to represent what it's meant for. In addition to this, you also need to make sure that the component that you offer is customizable according to what users need. Let's say if I don't want to have an icon like the default icon, I can change it. Or I can decide that the X button is not accessible enough, so I change to a text button. This is customizable. And we talk about that meaning, accessible.

A lot of people, a lot of developers, tend to think that no one cares about accessibility. Accessibility is something very hard and not relevant to component library at all, but this is the wrong thing. You develop a component, it has to be accessible at some standard in order for the whole system to work based on what you do. And talking about accessible, it also means that you have a website that looks good on desktop. It also has to look good on mobile and not just on mobile, in any Zoom, any device, screen view port, 200, 400 percent, everyone nowadays needs Zoom anyway, and that comes down to responsiveness.

2. Building a Component Library

Short description:

And lastly, the components you offer have to be isolated and testable. When you develop a component library, you need to ensure visual consistency and functional consistency. The component library is just a small part of the whole design system you are building. When building a component library, you need to plan and decide what, who, and why you build it for. An example is Storefront UI, a component library tailored specifically to the e-commerce industry.

And lastly, the components you offer have to be isolated and testable. Well, no one uses a component library without being tested properly, right? Because otherwise you don't want to end up in the morning, wake up and saw that someone report another bug that belonged to the component library because the component library doesn't test and you have no idea how to fix it.

And that comes to these categories divided into things. One is visual consistency. That means when you develop a component library you need to make sure you have a standard to follow. Colors, palettes, painting, typography all of these are visual things. No user will want to experience something not consistent, both developer and end user. This is the UI part of component library.

And the second category is functional consistency. What does it mean? If the user sees a close button on a sidebar it means, when he clicks on it, he expects to close it. No matter what the designer can tell you, a close button only needs to do one thing. Close it. Don't surprise anyone. No one likes surprises. I don't like surprises. So, just don't do anything extra. And that part is user experience of component library. And these two categories come down to one thing.

People think that component library is something like, just a big thing. Like, something you offer and people will use it. In fact, component library is just a small part of the whole design system you are building. And the component library is actually the implementation code after you define all these style guides, design system, themes, typography, everything else. And when you develop a component library it's not just sitting down there and write code. It's sitting down there planning a good design system. So, how are we going to build a component library? All of that. Well, first of all, you can't decide that you want to build a generic component library that have everything else, have multiple, a lot of different components for every single use case. No, that's not the case. When you build a component library you need to plan and decide what, who and why you build it for. And one of the example is from one of my projects called Storefront UI. We built a component library tailored specifically to a user from e-commerce industry.

QnA

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

Design Systems: Walking the Line Between Flexibility and Consistency
React Advanced 2021React Advanced 2021
47 min
Design Systems: Walking the Line Between Flexibility and Consistency
Top Content
The Talk discusses the balance between flexibility and consistency in design systems. It explores the API design of the ActionList component and the customization options it offers. The use of component-based APIs and composability is emphasized for flexibility and customization. The Talk also touches on the ActionMenu component and the concept of building for people. The Q&A session covers topics such as component inclusion in design systems, API complexity, and the decision between creating a custom design system or using a component library.
A Framework for Managing Technical Debt
TechLead Conference 2023TechLead Conference 2023
35 min
A Framework for Managing Technical Debt
Top Content
Today's Talk discusses the importance of managing technical debt through refactoring practices, prioritization, and planning. Successful refactoring requires establishing guidelines, maintaining an inventory, and implementing a process. Celebrating success and ensuring resilience are key to building a strong refactoring culture. Visibility, support, and transparent communication are crucial for addressing technical debt effectively. The team's responsibilities, operating style, and availability should be transparent to product managers.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
Watch video: Debugging JS
Debugging JavaScript is a crucial skill that is often overlooked in the industry. It is important to understand the problem, reproduce the issue, and identify the root cause. Having a variety of debugging tools and techniques, such as console methods and graphical debuggers, is beneficial. Replay is a time-traveling debugger for JavaScript that allows users to record and inspect bugs. It works with Redux, plain React, and even minified code with the help of source maps.
Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
This Talk discusses building a voice-activated AI assistant using web APIs and JavaScript. It covers using the Web Speech API for speech recognition and the speech synthesis API for text to speech. The speaker demonstrates how to communicate with the Open AI API and handle the response. The Talk also explores enabling speech recognition and addressing the user. The speaker concludes by mentioning the possibility of creating a product out of the project and using Tauri for native desktop-like experiences.
A Practical Guide for Migrating to Server Components
React Advanced 2023React Advanced 2023
28 min
A Practical Guide for Migrating to Server Components
Top Content
Watch video: A Practical Guide for Migrating to Server Components
React query version five is live and we'll be discussing the migration process to server components using Next.js and React Query. The process involves planning, preparing, and setting up server components, migrating pages, adding layouts, and moving components to the server. We'll also explore the benefits of server components such as reducing JavaScript shipping, enabling powerful caching, and leveraging the features of the app router. Additionally, we'll cover topics like handling authentication, rendering in server components, and the impact on server load and costs.
Power Fixing React Performance Woes
React Advanced 2023React Advanced 2023
22 min
Power Fixing React Performance Woes
Top Content
Watch video: Power Fixing React Performance Woes
This Talk discusses various strategies to improve React performance, including lazy loading iframes, analyzing and optimizing bundles, fixing barrel exports and tree shaking, removing dead code, and caching expensive computations. The speaker shares their experience in identifying and addressing performance issues in a real-world application. They also highlight the importance of regularly auditing webpack and bundle analyzers, using tools like Knip to find unused code, and contributing improvements to open source libraries.

Workshops on related topic

Build Modern Applications Using GraphQL and Javascript
Node Congress 2024Node Congress 2024
152 min
Build Modern Applications Using GraphQL and Javascript
Featured Workshop
Emanuel Scirlet
Miguel Henriques
2 authors
Come and learn how you can supercharge your modern and secure applications using GraphQL and Javascript. In this workshop we will build a GraphQL API and we will demonstrate the benefits of the query language for APIs and what use cases that are fit for it. Basic Javascript knowledge required.
Build a Data-Rich Beautiful Dashboard With MUI X's Data Grid and Joy UI
React Summit 2023React Summit 2023
137 min
Build a Data-Rich Beautiful Dashboard With MUI X's Data Grid and Joy UI
Top Content
WorkshopFree
Sam Sycamore
Siriwat (Jun) Kunaporn
2 authors
Learn how to put MUI’s complete ecosystem to use to build a beautiful and sophisticated project management dashboard in a fraction of the time that it would take to construct it from scratch. In particular, we’ll see how to integrate the MUI X Data Grid with Joy UI, our newest component library and sibling to the industry-standard Material UI.
Table of contents:- Introducing our project and tools- App setup and package installation- Constructing the dashboard- Prototyping, styling, and themes - Joy UI features- Filtering, sorting, editing - Data Grid features- Conclusion, final thoughts, Q&A
Building a Shopify App with React & Node
React Summit Remote Edition 2021React Summit Remote Edition 2021
87 min
Building a Shopify App with React & Node
Top Content
WorkshopFree
Jennifer Gray
Hanna Chen
2 authors
Shopify merchants have a diverse set of needs, and developers have a unique opportunity to meet those needs building apps. Building an app can be tough work but Shopify has created a set of tools and resources to help you build out a seamless app experience as quickly as possible. Get hands on experience building an embedded Shopify app using the Shopify App CLI, Polaris and Shopify App Bridge.We’ll show you how to create an app that accesses information from a development store and can run in your local environment.
Build a chat room with Appwrite and React
JSNation 2022JSNation 2022
41 min
Build a chat room with Appwrite and React
WorkshopFree
Wess Cope
Wess Cope
API's/Backends are difficult and we need websockets. You will be using VS Code as your editor, Parcel.js, Chakra-ui, React, React Icons, and Appwrite. By the end of this workshop, you will have the knowledge to build a real-time app using Appwrite and zero API development. Follow along and you'll have an awesome chat app to show off!
Hard GraphQL Problems at Shopify
GraphQL Galaxy 2021GraphQL Galaxy 2021
164 min
Hard GraphQL Problems at Shopify
WorkshopFree
Rebecca Friedman
Jonathan Baker
Alex Ackerman
Théo Ben Hassen
 Greg MacWilliam
5 authors
At Shopify scale, we solve some pretty hard problems. In this workshop, five different speakers will outline some of the challenges we’ve faced, and how we’ve overcome them.

Table of contents:
1 - The infamous "N+1" problem: Jonathan Baker - Let's talk about what it is, why it is a problem, and how Shopify handles it at scale across several GraphQL APIs.
2 - Contextualizing GraphQL APIs: Alex Ackerman - How and why we decided to use directives. I’ll share what directives are, which directives are available out of the box, and how to create custom directives.
3 - Faster GraphQL queries for mobile clients: Theo Ben Hassen - As your mobile app grows, so will your GraphQL queries. In this talk, I will go over diverse strategies to make your queries faster and more effective.
4 - Building tomorrow’s product today: Greg MacWilliam - How Shopify adopts future features in today’s code.
5 - Managing large APIs effectively: Rebecca Friedman - We have thousands of developers at Shopify. Let’s take a look at how we’re ensuring the quality and consistency of our GraphQL APIs with so many contributors.
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!