The toolbar buttons for CKEditor in Drupal Core could be made significantly more accessible by visually impaired screen reader users (or other people with disabilities) by adding a few more keyboard commands. While it's true that you can access the toolbar via alt+F10, keyboard commands are MUCH easier, faster, intuitive and stable. Perhaps not EVERY toolbar button could (or should) get a keyboard command, but more ought to. The editor that comes with Drupal Core ought to have as many toolbar accessibility keyboard commands as reasonably possible.

Some toolbar buttons already have keyboard commands (e.g., control+[b]old, control+[i]talic, etc.). It would be VERY helpful to add the following keyboard commands. These are listed in the order of those which would be most helpful.

- DrupalI[m]age = alt+m (noting the nearly completed issue "Allow image style to be selected in Text Editor's image dialog (necessary for structured content)", link below)

https://www.drupal.org/node/2061377

- PasteFrom[W]ord = alt+w

- Sourc[e] = alt+e

- JustifyLeft = alt+, (comma)

- JustifyCenter = alt+. (period)

- JustifyRight = alt+/ (slash)

- JustifyBlock = alt+; (semicolon)

- RemoveFormat = alt+z

- DrupalUnlin[k] = alt+k

- [B]ulletedList = alt+b

- [N]umberedList = alt+n

- Block[q]uote = alt+q

- Table = alt+t

- SpecialChar = Alt+c (to insert a special character)

Custom buttons which someone might create on their own are not a concern. If someone goes and makes their own button or uses an editor other than that which comes with Drupal Core, well, they are on their own. Of course, the alt+0 "Accessibility Instructions" help screen would need to be updated to reflect the foregoing. And, perhaps the actual CKEditor help document page at the following link would need to be similarly updated.

https://docs.ckeditor.com/#!/guide/dev_shortcuts

Finally, when within the edit body field, the Editor Context Menu (accessed by either shift+ctrl+F10 or applications key, the equivalent of a mouse right button click) seems woefully underused. Perhaps ALL the "Active" toolbar buttons, or at least all the Active buttons with a corresponding accessible keyboard command, could be accessed this way too.

Comments

richardbmcdonald created an issue. See original summary.

mgifford’s picture

Issue tags: +accesskey

Thanks @richardbmcdonald for posting this.

I'm not sure if anyone in CKEditor is looking at this, but this might pose a problem for the upcoming WCAG 2.1 guidelines:
https://github.com/w3c/wcag21/issues/69

There are a few known issues with keyboard shortcuts as described here:
http://webaim.org/techniques/keyboard/accesskey

Still I recognize that it can provide some real time savings if they are set up properly and actually discoverable to the user.

mlewand’s picture

I also agree that we could include more keyboard shortcuts to be available by default.

Headers

We could also add headers to the list.

A pretty common hotkey for that is ctrl/cmd+alt+(number) (MS Word, Gdocs), and this is actually something that we proposed in editor recommendations project, after a bit of a discussion on header hotkeys.

Justification

How about following hotkeys for alignment:

Command Hotkey
left align ctrl/cmd+shift+l
right align ctrl/cmd+shift+r
center align ctrl/cmd+shift+e
justify ctrl/cmd+shift+j

Such combinations seems to be easier to remember for casual users, and also have a better interoperability with other editors.

On a side note: in terms of keystrokes discoverability, you'll be happy to see what we have in store for 4.8.0 - we're preparing an enhancement to a11yhelp plugin that will list all the keystrokes. List is generated dynamically, so any new plugins, changes in the configuration will be reflected in this list. Here's an example screen of keystrokes list.

richardbmcdonald’s picture

Hi mgifford! I read both of your citations. I am not sure that the single access key thing poses an issue since that relates mostly to a *voice input* user and not some one using a screen reader and the keyboard for input. And, the other citation (link) really just seems to advocate for as full an implementation of keyboard shortcuts as possible; which is just what I am suggesting here! I don't really see any reason why these keyboard commands couldn't be implemented, nor any conflict that doing so would cause. After all, some already exist!

richardbmcdonald’s picture

Hi mlewand! I fully agree with everything you said in your post. Your suggested keyboard shortcuts are just fine, in my opion too. Really, in fact, yours may be more standardized then were mine. Actually, the most important thing is that *they exist* rather than *what they are*! Finally, the forthcoming improvement to the accessibility instructions dialouge is fantastic!

richardbmcdonald’s picture

Does anyone know if the maker of CKEditor needs to be, or should be, brought-in on this issue? If so, how does that get done? Or, is this something that only involves Drupal?

mgifford’s picture

Hey @richardbmcdonald just wanted to let you know that this is a list of JAWS & VoiceOver keystrokes
http://doccenter.freedomscientific.com/doccenter/archives/training/jawsk...
http://lab.dotjay.com/notes/voiceover-commands/

These are just 2 screen readers. The Webaim article ends with "The bottom line: some users will benefit and some will not, and some may even be disadvantaged."

It's not a clear cut issue. With Drupal one of the challenges is a combination make make sense in English, but may not make any sense in any other language.

Implementation should be done carefully & with proper testing. Perhaps the CKEditor folks have already done this.

Charles Belov’s picture

Added related issue as linked from issue summary.

Wim Leers’s picture

Issue tags: +Needs upstream feature

Does anyone know if the maker of CKEditor needs to be, or should be, brought-in on this issue?

You're in luck, @mlewand is that person! He works for CKSource, the company behind CKEditor. I coordinate with him all the time :)

Per #3, it sounds like this will be soled by CKEditor 4.8?

mlewand’s picture

Per #3, it sounds like this will be soled by CKEditor 4.8?

Not really, this issue is about adding new hotkeys, while comment #3 mentions confirmed 4.8.0 enhancement that is about keystorkes/hotkeys dialog only.

I have created an Issue that will address this particular issue, see https://github.com/ckeditor/ckeditor-dev/issues/916.

Wim Leers’s picture

Title: Improve Accessibility of CKEditor with Additional Keyboard Commands » [upstream] Improve Accessibility of CKEditor with Additional Keyboard Commands
Status: Active » Postponed

Thanks, @mlewand! 👌

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Postponed » Postponed (maintainer needs more info)
Issue tags: -

What additional work if any still needs to be done?

quietone’s picture

Project: Drupal core » CKEditor 4 - WYSIWYG HTML editor
Version: 9.5.x-dev » 1.0.x-dev
Component: ckeditor.module » Code

CKEditor has been removed from core, CKEditor 4 is removed from Drupal Core in 10.0.0