Skip to content
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

[core] Use hard tabs in the source for accessibility #22283

Open
1 task done
mbrookes opened this issue Aug 19, 2020 · 6 comments
Open
1 task done

[core] Use hard tabs in the source for accessibility #22283

mbrookes opened this issue Aug 19, 2020 · 6 comments
Labels
accessibility a11y core Infrastructure work going on behind the scenes

Comments

@mbrookes
Copy link
Member

mbrookes commented Aug 19, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

Hard tabs allow contributors to choose how many spaces a tab represents, which aids accessibility.

Discussion:
rome/tools#425

Examples 🌈

https://github.com/romefrontend/rome

Motivation 🔦

Material-UI as a user interface component library has a strong accessibility ethic. This should extend to contributor DX.

@mbrookes mbrookes added accessibility a11y core Infrastructure work going on behind the scenes labels Aug 19, 2020
@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 19, 2020

  • Following the default prettier configuration makes it more likely for developers to be able to read our source in GitHub.
  • GitHub displays tabs with 4 spaces by default in the UI with no easy way to configure it (there are no global settings in your account, as far as I know). IMHO, it's a deal-breaker if we can't fix it.

@mbrookes
Copy link
Member Author

https://twitter.com/editorconfig/status/610836234676535296

@eps1lon
Copy link
Member

eps1lon commented Aug 20, 2020

Disclosure: I started using tabs in new projects about 6 months ago.

Looking back I always justified spaces with their superiority for manual formatting across environments. Using tabs just didn't work if you wanted to align your SQL queries or hardcoded data structures. But when prettier came along and I grew used to it I never re-evaluated my choice. Since we don't manually format code anymore, tabs are objectively better for a11y and most tools I'm aware of support custom tab-width I don't see a reason to use spaces anymore.

@oliviertassinari
Copy link
Member

https://twitter.com/editorconfig/status/610836234676535296

@mbrookes If we can have a default shared configuration of two spaces for tabs, have it work in GitHub and popular text editors, this would work from my end.

@mbrookes
Copy link
Member Author

mbrookes commented Aug 20, 2020

It all seems to work – I had to adjust my editor to display tabs as two spaces, but that's kind of the point! :)

git diff output is 4 spaces because it outputs tabs, and 4 is the console / pager default, but there's a git config setting for that too.

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 29, 2020

Summary of the exploration of #22305. We are waiting for GitHub to come through to resume the changes. We need:

@oliviertassinari oliviertassinari changed the title [core] Use hard tabs for accessibility [core] Use hard tabs in the source for accessibility Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y core Infrastructure work going on behind the scenes
Projects
None yet
Development

No branches or pull requests

3 participants