This change replaces spaces for tabs to provide accessible indentation in SpicySections.js.
Why are tabs more accessible than spaces?
Tabs are more accessible than spaces because they represent indentation visually and non-visually. Tabs allow developers to choose the indentations that make the most sense for them. Tabs improve how code is interpreted in non-visual mediums.
**Example**
> Just had a conversation about indentation with a blind programmer, and realized this is the most accessible indentation convention as well. Tabs as indentation means # tabs = indent level, and all spaces (including alignment spaces) can be simply ignored when reading out code.
> — [@fantasai](https://twitter.com/fantasai/status/1039647453618659328) (W3C CSSWG specifications writer, 2004 to present)
**Example**
- Jane Developer uses a tab width of 1 because they use a large font size.
- Jill Developer uses a tab width of 8 because they use a very wide monitor.
Only tabs allow developers to choose their tab width.
**Example**
Alan struggles reading two-space indentation at a comfortable font size. To reach a comfortable indentation, Alan must increase the text size. Alan now struggles reading uncomfortably large text at a comfortable indentation.
Can 2-space, 4-space, etc indentation be accessible?
No. At least, no yet. If at some future point browsers and IDE developers can change how space-indentation is announced and can enable space indentation to stretch or contract — this could be changed to any other preference. Until this, this change is backwards compatible by decades.
To accomplish this change:
I ran prettier to evaluate its opinions.
I ran eslint with eslint-config-standard, because I prefer this more liberal code formatter.
I went thru the changes line-by-line to be sure I was satisfied with all newline and indentation changes.
I ran eslint again to ensure it would not add any additional changes.
I resolved a notable eslint error, to remove an unused line of code (let tabId = ensureId(tabSource)).
I capitalized every "TODO" in any comment.
I did not commit the configuration to this project, but I will if we think it would be desirable.
I am fine with all of these - it's a little hard to review as it touches the whole file, but we've tested and have tests and nothing seems breaking, so I approve.
This change replaces spaces for tabs to provide accessible indentation in
SpicySections.js
.Why are tabs more accessible than spaces?
Tabs are more accessible than spaces because they represent indentation visually and non-visually. Tabs allow developers to choose the indentations that make the most sense for them. Tabs improve how code is interpreted in non-visual mediums. **Example** > Just had a conversation about indentation with a blind programmer, and realized this is the most accessible indentation convention as well. Tabs as indentation means # tabs = indent level, and all spaces (including alignment spaces) can be simply ignored when reading out code. > — [@fantasai](https://twitter.com/fantasai/status/1039647453618659328) (W3C CSSWG specifications writer, 2004 to present) **Example** - Jane Developer uses a tab width of 1 because they use a large font size. - Jill Developer uses a tab width of 8 because they use a very wide monitor. Only tabs allow developers to choose their tab width. **Example** Alan struggles reading two-space indentation at a comfortable font size. To reach a comfortable indentation, Alan must increase the text size. Alan now struggles reading uncomfortably large text at a comfortable indentation.
Can 2-space, 4-space, etc indentation be accessible?
No. At least, no yet. If at some future point browsers and IDE developers can change how space-indentation is announced and can enable space indentation to stretch or contract — this could be changed to any other preference. Until this, this change is backwards compatible by decades.
To accomplish this change:
let tabId = ensureId(tabSource)
).I did not commit the configuration to this project, but I will if we think it would be desirable.