Core: Please consider converting from space indentation to tabs to improve code for persons with visual impairments

Created on 10 Jan 2020  路  4Comments  路  Source: dotnet/core

Convert to tabs to improve code for persons with visual impairments

I like to reference the Code of Conduct, and point out that the current code base, due its usage of spaces for indentation, is problematic for persons with visual impairments.

See also this article regarding the problems of spaces as indentation for developers with visual impairments.

I like to start a discussion about improving the accessibility of the code for people with disabilities, by changing the coding styleguide to change the indentation to tabs, and also converting all indentation in the code.

Most helpful comment

I think we would have much greater impact by working on improving Visual Studio (both itself, Code, and for Mac) and working with other IDEs to improve their experience as well (maybe in the form of some open source tooling).
There are a plethora of languages which are whitespace sensitive (including F#, markdown, and others) which will never be able to convert to tabs or which may behave differently once converted.

I think this should be looked at as a tooling issue tooling issue and that the IDE is the best thing to abstract away whitespace. I would expect actually modifying the source base (and then maintaining it moving forward) is going to be a difficult and error-prone process (especially when the difference may be significant, such as in verbatim string literals or when it is used for alignment, such as in documentation or visualizing patterns like a 4x4 matrix or tables). While providing proper IDE support or tooling would allow things to be fixed and iterated on independent of the code base or any language restrictions.

All 4 comments

I saw this same topic show up on twitter @ https://twitter.com/anurse/status/1215146449807110144

For fairness, this isn't a CoC issue. The CoC does mention disabilities, but it's specifically related to harassment. Just want to make sure we use CoC for the right things.

That all said, this seems like a good conversation. What do people think about it?

I think we would have much greater impact by working on improving Visual Studio (both itself, Code, and for Mac) and working with other IDEs to improve their experience as well (maybe in the form of some open source tooling).
There are a plethora of languages which are whitespace sensitive (including F#, markdown, and others) which will never be able to convert to tabs or which may behave differently once converted.

I think this should be looked at as a tooling issue tooling issue and that the IDE is the best thing to abstract away whitespace. I would expect actually modifying the source base (and then maintaining it moving forward) is going to be a difficult and error-prone process (especially when the difference may be significant, such as in verbatim string literals or when it is used for alignment, such as in documentation or visualizing patterns like a 4x4 matrix or tables). While providing proper IDE support or tooling would allow things to be fixed and iterated on independent of the code base or any language restrictions.

It sounds like an option to scale the width of left-most whitespace in VS would help significantly.

Tabs would eliminate the problem all together for languages that are not whitespace sensitive and the fact that already the concept of tab-width is such a established concept, it does not sound reasonable to reinvent this abstraction as something that we would expect every IDE to build and assume it works correctly considering that space could be used both for indentation and alignment.

Does switching to Tabs solve all the accessibility issues? No, the English language is space sensitive and tabs are not used in it, but we do not have to wait till we have a solution for everything to make our code accessible. Most of modern and commonly used programming languages are space insensitive, so switching to tabs could solve the issue for many people. Also, it would be cool to be part of the reason why the future language creators are encouraged to create more accessible languages by not making them space sensitive.

We do not have to switch alignments; they are not the source of visual inaccessibility. It is the indentation that is the main issue. We can continue to align with spaces, but use tabs for indentations.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

swapnild2111 picture swapnild2111  路  3Comments

leo2d picture leo2d  路  3Comments

jigarce picture jigarce  路  3Comments

ffes picture ffes  路  3Comments

Luis-DdlFG picture Luis-DdlFG  路  3Comments