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

Keep the "Code editor" as a simple textarea #5698

Closed
afercia opened this issue Mar 19, 2018 · 6 comments
Closed

Keep the "Code editor" as a simple textarea #5698

afercia opened this issue Mar 19, 2018 · 6 comments
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Milestone

Comments

@afercia
Copy link
Contributor

afercia commented Mar 19, 2018

See also #569. The accessibility team has identified a list of 10 high priority issues for version 1 and agreed with the Gutenberg team to mark them with the "merge proposal" milestone.

The so called "text mode", i.e. a simple textarea, is the only guarantee to enable all users to publish content, regardless of the device / technology used and regardless of their level of accessibility.

The accessibility team recommendation is to keep a simple textarea available to users. If a true "Code editor" with syntax highlighting is desired, no objections to that (even if personally I'd see a dedicated block with syntax highlighting a better option). But then, there should be a third editor "mode" : a plain textarea.

@afercia afercia added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Mar 19, 2018
@afercia afercia added this to the Merge Proposal milestone Mar 19, 2018
@youknowriad
Copy link
Contributor

That's already the case right? The current code editor is just a simple textarea. Can we close this issue?

@afercia
Copy link
Contributor Author

afercia commented Mar 20, 2018

If that's a confirmed decision, sure 🙂 (there were previous plans to add syntax highlighing to the code editor)

@youknowriad
Copy link
Contributor

cc @jasmussen @mtias

@jasmussen
Copy link
Contributor

I can only share personal opinions, I think the calls have to be made by the WordPress core leads, and secondarily the Gutenberg core leads.

As such, take this for what it is, and not coming from a lead: but my personal opinion is that it's fine to keep the code editor completely pure. We might look at adding some plugin hooks so a plugin can add syntax highlighting, perhaps, but I'm fine with the base offering being pure.

The past discussion, which I believe is what you're referring to Riad, surrounds the desire to add syntax highlighting to many more areas of WordPress, for example as has been added to WordPress 4.9 widgets:

screen shot 2018-03-20 at 13 28 30

The closest parallel is blocks, where the Gutenberg Custom HTML block also has syntax highlighting like this. This might further extend to the "Edit as HTML" option that exists on a per block basis:

screen shot 2018-03-20 at 13 30 35

But does that extend to the full-on code editor? Like I said, I'd be fine if it didn't.

@mtias
Copy link
Member

mtias commented Mar 20, 2018

I'm fine with keeping the code editor as a plain text area. It can be revisited if needed as a separate project or iteration in future versions.

@afercia
Copy link
Contributor Author

afercia commented Mar 20, 2018

Thanks all for the clarifications. As said, no objections to add syntax highlighting to the "Code" editor (or to other places) but then at that point there should be a "pure" fallback, i.e. 3 modes:

  1. Visual: visual editor
  2. Code: syntax highlighting
  3. "Plain": simple textarea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Projects
None yet
Development

No branches or pull requests

4 participants