4 ms·
Python?
by TalktoCrystal 3y ago
Python?
- PaulHoule 3y agoHow would somebody blind perceive indentation in Python?
- allan_s 3y agoI'm not blind, but I would say that in any case you need your screen reader the ability to tell you "the current line is inside that if , which is inside that function" when you hit a "give me the context" ? regardless of the indentation system of said language
- Davidbrcz 3y agoThe screen readers can say the number of indentation.
- withinboredom 3y agoI really hope they used tabs instead of spaces .... space space space space space if ah equals equals bee ... space space space space space space space space space ... I'm going insane just thinking about counting spaces.
- arrowsmith 3y agoOr instead of "space space space space space space space space" they could just say "eight spaces".
- sargstuff 3y agoPipe/redirect through sed to change start of line spaces to string format of #8 #; followed by rest of line. Without semicolin after final # comments whole line.
- withinboredom 3y agoYou are really hoping a computer will be smart, huh? https://www.youtube.com/watch?v=94swlF55tVc https://www.youtube.com/watch?v=94swlF55tVc
- ali_m 3y agoI remember reading somewhere in a different HN thread that some tools use pitch to represent indentation depth. There are all sorts of audio cues that can be used to represent syntactic information about code.
- arrowsmith 3y agoThat's really interesting. I wonder what other audio cues can be used other than the simple content of the words. Voice, maybe? Humans are great at distinguishing lots of different voices. Are there any screen reader tools that use a mixture of different people's voices to add additional fidelity to the information?
- ali_m 3y agoYes, some screen readers such as JAWS can be configured to use a different voice to represent bold text, for example. They can also use non-speech sounds to represent things such as HTML elements. One of the things that really blew my mind is just how fast a proficient screen reader user can crank up the speed, e.g. https://soundcloud.com/freecodecamp/zersiaxs-screen-reader https://soundcloud.com/freecodecamp/zersiaxs-screen-reader. It's totally unintelligible to me, and doesn't even sound much like human speech. If you're no longer constrained by the speed and sound of normal speech all kinds of other interesting audio representations become possible.
- PaulHoule 3y agoMy understanding is that most people perceive relative pitch in music (is this note higher or lower than the other notes around it) but not absolute pitch. I'd expect people to have to no trouble teasing out the indentation of a stretch of code, but if you hear just a few words out of context (which you do a lot with a screen reader... I'm not blind but I've been tasked with making sites accessible and spent a lot of time w/ NVDA) you will probably lose the thread.
- yawpitch 3y agoIt would be pretty trivial to write an AST visitor that would treat each new indentation level as an “inside [function|while|if|etc]” … that’s going to handle your already syntactically correct code. Bit harder to deal with syntax errors and mixed indentation, but if there’s a way to tell a sighted user about it there’s a way to tell a not-sighted one. Assuming you care enough about humans to do so, mind.
- worthless-trash 3y agoI worked with a proficient blind python programmer. It didn't seem to bother him in the slightest.