-
Notifications
You must be signed in to change notification settings - Fork 26
Using tabs for accessibility #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There's no plan to break backwards compatibility with existing PSR-12 for now. |
I'd like to keep this issue open since the accessibility aspect of indentation hasn't been fully discussed. The backwards compatibility break this would cause would likely force maintainers to change 90% of the lines in their codebases causing git blame to be polluted. So with that in mind we will continue to recommend spaces over tabs while encouraging people to do what Kirby is doing and say something like "We are Coding Style PER compliant with the following changes:" for the foreseeable future. |
I will also note that there is a fair number of anecdotal statements about tabs being better for accessibility, but I am not aware of any actual research or verification of that claim. For PHP to switch, there would need to be clear, research-based evidence that it notably improves accessibility. A tweet of a GitHub comment does not achieve that standard. |
https://www.reddit.com/r/javascript/comments/c8drjo/comment/eszeclz/ is an interesting discussion. |
Spaces instead of tabs goes back to PSR-2, not PSR-12. PSR-2 had a lot of problems, most notably that decisions were made based purely on a naive survey rather than considering what made consistent sense. At the time, though, WordPress was basically the only project in PHP that used tabs. Everyone used spaces. And at the time, no one was talking about one being better for accessibility, and all "less error prone" and "more welcomed" claims (either direction) are and have always been entirely circumstantial and subjective with no data to back them up. Seriously, until and unless there's some actual academic research on this topic any words spent on it are a total waste of time. |
Has switching to tabs instead of spaces been considered for accessibility reasons? This tweet has been making the rounds recently: https://twitter.com/Rich_Harris/status/1541761871585464323
Kirby CMS recently made the switch too: getkirby/kirby#4454
The text was updated successfully, but these errors were encountered: