Scott Fryxell

16th Street Bart station. At the far end with a train in the station

a11y in the code

November 9, 2021

I can't spell the word accessibility. I can’t spell a lot of words. As a dyslexic, it's even harder for me to read them. I was diagnosed in my late thirties, well into my career as a software developer. Dyslexia––commonly defined as a brain-based learning disability that specifically impairs a person’s ability to read despite having normal intelligence––affects up to 20 percent of the population and is the most common of all neuro-cognitive disorders. As software development matures into the twenty-first century, most software companies will have us on their teams.

We can talk about accessibility, or we can practice accessibility. How do we include and optimize for the widest array of readers? Take a moment to consider variable naming.

As I read through a line of code, my brain only processes the shape of the whole word to begin to understand it. It is a spacial understanding, rather than linear. PascalCase is becoming all the rage as it improves editors’ ability to autocomplete and make inferences about code. VueJs is going all in on PascelCase and the new <script setup> syntactic sugar. You have to use PascalCase to get components auto-included in your template. But for my own purposes and for the accessibility of others like me, I use snake_case and kabab-case for my naming.

Forced into other types of casing slows me down. I am robbed of my shape-first reading strategy.

We've been using spaces between words for ten thousand years. And it’s been less than a century since dyslexia has been widely understood. I don't understand why I have to prove having a space between words makes programming accessible to the largest possible audience.