Skip to content

Instantly share code, notes, and snippets.

View svinkle's full-sized avatar

Scott Vinkle svinkle

View GitHub Profile
<input type="search" aria-label="Search" name="q">
<label for="firstName">First Name</label>
<input type="text" id="firstName" name="first_name" autocomplete="given-name">
<div class="label">First Name</div>
<input type="text" name="first_name" autocomplete="given-name">
@svinkle
svinkle / a11y-react-live-coding-notes-links.md
Created October 17, 2018 13:26
Creating accessible React apps — a11yTOConf 2018 — Notes and Links

Safari Keyboard Navigation

In order to allow for full keyboard navigation of all element in Safari on macOS, make sure the following options are enabled.

All Controls in macOS

In the macOS settings, allow "All Controls" to be keyboard accessible. Enable this feature by going to:

  1. Settings
  2. Keyboard
@svinkle
svinkle / video-toggle.html
Created September 5, 2017 20:14
HTML to toggle a video play/pause control.
<!-- Untoggled state -->
<button class="toggle-button player-button font-bold" aria-pressed="false" aria-label="Pause video">
<span class="close-icon font-bold" aria-hidden="true">×</span>
</button>
@svinkle
svinkle / popup.css
Last active June 17, 2017 12:16 — forked from davatron5000/popup.css
Universal Popup Control
[aria-hidden="true"] {
display: none;
}
@svinkle
svinkle / screencast-with-voiceover.md
Last active March 18, 2022 01:49
Screencast with VoiceOver

Screencast with VoiceOver

Here’s a quick how-to on recording your Mac desktop while using the VoiceOver screen reader. With this setup you’ll be able to capture both video and internal audio at the same time, and hear the audio output while recording.

Setup

For this setup we’ll be on OS X El Capitan and use QuickTime to capture the video and audio. The only extra thing required is the iShowU Audio Capture driver.

Steps

@svinkle
svinkle / a11y.md
Last active December 28, 2015 23:48
a11y

a11y

The following covers developing for accessibility and keyboard/screen reader users. There is much, much more to making everything accessible for all people. More to be added soon.

Screen reader A11Y from a development perspective

“WAI-ARIA, the Accessible Rich Internet Applications Suite, defines a way to make Web content and Web applications more accessible to people with disabilities. It especially helps with dynamic content and advanced user interface controls developed with Ajax, HTML, JavaScript, and related technologies.” - https://www.w3.org/WAI/intro/aria

The first rule of using ARIA is not to use it. Only use it if absolutely necessary. It at all possible, use native HTML elements. Native controls have keyboard interactions and accessibility baked in from the start. Using these will save lots of time and make for way less code, making your application smaller and more manageable.

Test with a keyboard

@svinkle
svinkle / getting-started-with-nvda.md
Last active August 29, 2015 14:21
Getting started with NVDA

Getting started with NVDA

NVDA is a free and open source screen reader from NVAccess. It is available for the Windows operating system and officially supports Internet Explorer, Firefox, and Chrome web browsers. There is also a ton of braille display support!

NVDA is available for download here: http://www.nvaccess.org/download/

After everything is installed you can press Ctrl + Alt + n to start NVDA. Quitting NVDA is done by pressing NVDA + q, then enter at the prompt.

The NVDA Modifier Key

Each screen reader has a special key or key combination to perform tasks. NVDA’s default keyboard modifier key is the insert key. So, for example, to start reading a web page, you could press insert + down arrow. As an option, if you are using a laptop you can also use the caps lock key as a modifier. This can be set in the Preferences > Keyboard settings... menu.