Live data from Hacker News

Ask HN: How should a programming language accommodate disabled programmers?

news.ycombinator.com

1–10 of 122 posts

Ask HN: How should a programming language accommodate disabled programmers?

#1
I work on programming languages (as a career & hobby) and I’d like to make sure that my main language project is designed with accessibility in mind. I need some guidance & opinions from people with disabilities (e.g., blind or visually impaired people, or people with mobility issues) about your pain points with existing tools.

This doesn’t need to be just about the language itself, but the whole experience of developing with it, e.g., tooling, error messages, documentation, editor integration, &c.; as simple as “Avoid making me press Shift” or as involved as specific problems with existing tools and what you wish they did better. I’d also welcome examples of tools that do things particularly well!

So far I’ve had/implemented a few general ideas:

1. Making whitespace-sensitive syntax, like in Python & Haskell, optional syntactic sugar for explicit brackets & separators. It can also be turned off entirely, if e.g. you work with a screenreader and prefer it not need to speak all the indentation.

2. Striking a balance between concision and avoiding excessive punctuation-based syntax. I’ve also tried to make sure that visually similar characters have clearly distinct functions, so it’s less likely to mix them up—or if they are typo’d, at least the compiler should reliably detect this and produce a useful diagnostic.

3. Working on integration with existing editors (through the Language Server Protocol, an Emacs mode, &c.), so ideally you can continue to use the editor you’re comfortable with that supports your setup.

4. Allowing the interactive mode (sort of a souped-up REPL) to be customised to support screenreaders, colour settings for colourblind people, adapting gracefully to large fonts, and so on.

I’m certain there are plenty of things I’m still missing, though! So I’d really appreciate any help, personal stories, or links to the work of similar initiatives (like Accessible Scala) that you can offer. Thank you!

Re: Ask HN: How should a programming language accommodate disabled programmers?

#2
> Making whitespace-sensitive syntax, like in Python & Haskell, optional syntactic sugar for explicit brackets & separators.

Interesting question. A few years ago, I worked with a blind mathematician. I was an undergraduate T.A. and he was the main T.A. of the course. He used the screen reader a lot. In particular, he has the list of exercise in LaTeX. We read aloud the grades of the students and he wrote them in the Excel form.

I don't remember him using a programming language (excluding LaTeX). The indentation looks like a difficult problem, even if the language has explicit brackets. Does the screen reader say "Tab Tab print ten semicolon"? Does it ignore the indentation? Spaces vs tabs? ...

Do you have some group of blind programmers that you can ask about their current setup?

Re: Ask HN: How should a programming language accommodate disabled programmers?

#3

> Making whitespace-sensitive syntax, like in Python & Haskell, optional syntactic sugar for explicit brackets & separators. Interesting question. A few years ago, I worked with a blind mathematician. I was an undergraduate T.A. and he was the main T.A. of the course. He used the screen reader a lot. In particular, he has the list of exercise in LaTeX. We read aloud the grades of the students and he wrote them in the…

I wonder if it would be helpful to describe the indentation level you are on:

e.g:

  def method_here(value): # Indentation level 0
    x = 10 # Level 1
    y = 5  # Level 1
    if x == value # Level 1
      print 'x!' # Level 2
    elif y == value # Level 1
      print 'y!' # Level 2
You could maybe even throw in a block number so it's clearer.

Re: Ask HN: How should a programming language accommodate disabled programmers?

#4
Have you looked into projectional-editing? The basic idea is that your code is stored not as text, but as data. The data is then projected into a textual format for editing.

That seems like the best way to support disabled programmers, as it gives them the flexibility to make whatever syntax works for them, as long as your core AST is simple enough.

Re: Ask HN: How should a programming language accommodate disabled programmers?

#5

> Making whitespace-sensitive syntax, like in Python & Haskell, optional syntactic sugar for explicit brackets & separators. Interesting question. A few years ago, I worked with a blind mathematician. I was an undergraduate T.A. and he was the main T.A. of the course. He used the screen reader a lot. In particular, he has the list of exercise in LaTeX. We read aloud the grades of the students and he wrote them in the…

Not knowledgable about screen readers, but maybe having the increase in indentation result in an increase in pitch of the screen reader voice could be an interesting approach for this.

Re: Ask HN: How should a programming language accommodate disabled programmers?

#7
post #5

> Making whitespace-sensitive syntax, like in Python & Haskell, optional syntactic sugar for explicit brackets & separators. Interesting question. A few years ago, I worked with a blind mathematician. I was an undergraduate T.A. and he was the main T.A. of the course. He used the screen reader a lot. In particular, he has the list of exercise in LaTeX. We read aloud the grades of the students and he wrote them in the…

Not knowledgable about screen readers, but maybe having the increase in indentation result in an increase in pitch of the screen reader voice could be an interesting approach for this.

You beat me to this idea by five minutes!

Another bonus to this approach is that it enforces a style guide. Overly complicated and nested programs become more difficult to understand, and excessive nesting becomes literally incomprehensible as it spirals out of the human hearing range.

I wonder if you could also use different voices for different things. Code could be read in a masculine tone, code blocks in a feminine tone, inline strings with an Australian accent.

Re: Ask HN: How should a programming language accommodate disabled programmers?

#8
Blind people already do programming. I know a blind guy who can code really fast, much faster than my colleagues, no idea how though.

Shouldn't you be researching how they code now and then work from there? I actually feel like current way of coding using text works very well for blind people.

Re: Ask HN: How should a programming language accommodate disabled programmers?

#9
I do rough accessibility testing with JAWS on my company website, before we get people in to give it a thorough going over.

I would suggest you try it yourself, and download JAWS and write out some simple Hello World and figure out the challenges you face and then get in touch with disabled programmers and advocates.

Re: Ask HN: How should a programming language accommodate disabled programmers?

#10
T.V. Raman (author of Emacspeak) has said that "S-Expressions are a major win" for visually-impaired users because they give you a good way to navigate the code structurally ("go to beginning of expression" is more accessible than "go up one line").

https://tvraman.github.io/emacspeak/manual/Emacspeak-And-Sof...

Post reply on HN