We'll be focusing on building an accessible component by using a built-in browser API with React to implement best practices in accessibility custom features.
Everyone is responsible for accessibility, and we need to start creating features and websites with that in mind. The goal of this course is for you to exploit your understanding of HTML and aria and be able to look at any common features and identify the different accessibility patterns.
With this course, you won't only learn about accessibility but also will learn about HTMLMediaElement API and state management in React.
This course applies some best practices for creating custom audio controls for web applications accessible to users with assistive technology, such as screen readers. It advises using the built-in controls provided by the operating system, making sure that custom controls can be accessed using a keyboard and make sense to a screen reader, testing the custom controls with a screen reader, and avoiding duplicating information that the screen reader already provides.
It also uses the `loadedMetadata` event to ensure that audio has finished loading before allowing interaction and labeling elements with a unique id to make them easily distinguishable by assistive technology.
Overview
Syllabus
- Introduction to Creating a Custom Accessible Audio Player with React
- Setup Native Audio and Plan our Audio Player Code
- Creating a Toggle for Playing and Pausing the Audio
- Implementing a Duration State
- Tracking Audio Playback Progress by Adding Elapsed Time
- Create the Audio Scrubber to Control Playback Position
- Add Play and Pause Events to the Audio Player
- Add Fast-Forward and Rewind 15 Second Buttons
- Creating a Playback Rate Button
- Creating a Toggle Button for Muting and Unmuting an Audio Element in React
- Implementing a Volume Range with an onChange Event
- Design Accessible Buttons Using Icons
- Using Aria-Label as a Solution for Overly Complex Markup
- Create a Human Readable Time Formatter
- Create a Dropdown Menu for Rates
- Using a forwardRef to Create External Controls
Taught by
Lindsey Kopacz