[wp-trac] [WordPress Trac] #12423: Include default code editor

WordPress Trac noreply at wordpress.org
Tue Mar 7 21:09:11 UTC 2017


#12423: Include default code editor
-----------------------------+----------------------------
 Reporter:  scribu           |       Owner:  afercia
     Type:  feature request  |      Status:  assigned
 Priority:  normal           |   Milestone:  4.8
Component:  Editor           |     Version:  3.0
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  accessibility
-----------------------------+----------------------------

Comment (by zersiax):

 You called? ;)
 Ok ...so I had a quick read through this thread and I am seeing things I
 both agree and disagree with.
 Basically the talk I gave was about a number of code editors both on and
 offline, I covered Atom, Vs Code, CodeMirror and a couple of others. The
 only editor I am very slightly surprised by in a good way is Orion:
 https://orionhub.org/

 That's slightly overkill for WordPress though. Most of the things I could
 say about that have already been stated, namely:
 - ContentEditable is currently the only dynamic way I'm aware of to even
 make anything resembling a dynamic editor that's accessible to some
 degree, however as people have pointed out it's buggy and browser support
 varies quite a bit depending on what platform you're coming from.
 A multiline edit field, the other side of the spectrum,  is fine for
 screenreaders but does not give sighted users any form of syntax
 highlighting or autocompletion. When I see people implement Codemirror I
 tend to suggest to add a multiline edit field that either submits the code
 to the endpoint it needs to go to itself, or copies the written code to
 the codemirror instance on blur. This multiline edit field would only need
 to be visible for screenreaders, there's a myriad of ways to accomplish
 that.
 Now I'm not saying that is an ideal solution, its a patch at best, but it
 helps those websites by giving them something to work towards.  What you
 guys are doing is radically different in the fact you either want to make
 an editor from scratch or modify an existing one. My wishlist for an
 editor with accessibility functions really doesn't deviate all that
 strongly from any of yours, I reckon, namely:
 - Autocompletion that actually works/reads
 - Quick way of navigating through the code, be it by tag, by function, etc
 - If there are visual live announcements of errors or mistakes on a line,
 I would like to know about them
 - Syntax highlighting is obviously something screenreaders can't really do
 anything with and there is no standard way of fixing that, so that one is
 not on my list.
 - If there are controls in/around the editor, I want these controls to
 either be keyboard accessible or have a keystroke attached to them that is
 discernible in an easy way.

 Now this list is a sketch of an ideal situation. I haven't found any code
 editor, off or online, that does all of this, and I'm genuinely not sure
 if the web is the platform to build the first such editor on. But if you
 wanted a wishlist , here it is :)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/12423#comment:70>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list