Skip to content

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

Closed
imacrayon opened this issue Jul 4, 2022 · 5 comments
Closed

Using tabs for accessibility #25

imacrayon opened this issue Jul 4, 2022 · 5 comments

Comments

@imacrayon
Copy link

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

@samdark
Copy link
Member

samdark commented Jul 4, 2022

There's no plan to break backwards compatibility with existing PSR-12 for now.

@KorvinSzanto
Copy link
Contributor

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.

@Crell
Copy link
Collaborator

Crell commented Sep 12, 2022

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.

@samdark
Copy link
Member

samdark commented Sep 13, 2022

https://www.reddit.com/r/javascript/comments/c8drjo/comment/eszeclz/ is an interesting discussion.

@Crell
Copy link
Collaborator

Crell commented Nov 29, 2022

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.

@Crell Crell closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants