1/ Set the aria-labelledby attribute on the contenteditable div (find the label from
original textarea)
2/ Store/restore the selection for the contenteditable div when it is focused. This allows
you to select some text, then go to the toolbar and click a button, and the selection
will be restored before the button effect is applied.
3/ Add an accessibility helper plugin.
From testing in all screenreaders, I found that all of their support for contenteditable is not great.
They treat it like a textbox - which means you can type and edit text, but it tells you nothing about
the styles, links or images in the editor. So I added a button to the toolbar, that is only accessible
when navigating via keyboard, that opens an accesssibility helper dialogue. The dialogue shows the list
of current styles, a global list of all links, and a global list of all images. Choosing an image or link
from here, will focus on the editable region, and select the link/image.
4/ Add an accessibility checker plugin to Atto.
Checks for images with no alt, images and links with filenames as alternate text/link text, and contrast ratios
less than WCAG 2.0 AA.
The previous change on this issue accidentally fixed a selector,
so the repository API was recieving a valid node instead of null.
This means that it calls it's undocumented and dodgy callbacks on the node,
which are really calls directly to the TinyMCE API (just well buried).
But - by not setting the editor_target property, the api will not do
the secret handshakes.
If plugins try and do this themselves with Y.one, they will fall foul of the
qtype essay page bug which uses : in the id for form elements.
This is an alternative solution, to escaping the ids, which seemed unreliable for older
version of ie.
The cleanup rules are pulled from both testing of live docs, and the
jquery clean plugin. I tested with googledocs, libreoffice, word 2003
and word 2013.
Rewrite the atto plugin loader so that:
A) We have a real settings.php page and can edit the toolbar.
B) All plugins are loaded at the same time (not serially)
C) All plugins share the YUI sandbox (more performance boost).
I had to change the loading API for this - but there are not non-core uses yet,
this is the best time to break it.
In general aiming for compatibility with multiple browsers,
firefox, chrome and phantomjs to be more specific.
* Removing hardcoded waits
* Adding @_alert, @_switch_window and @_switch_frame tags,
to label actions that different drivers have problems with.
* Adding missing @_files_upload and @_only_local tags to features that
uploads files.
* Fixing a few wait for page ready what specified miliseconds.
* New methods to ensure elements (usual selectors), sections and editors
are ready to interact with
* Changing the select an option implementation to deal with the different
drivers implementations when listening to JS events.