Download & Extend

Accessibility plan for Edit module

Project:Drupal core
Version:8.x-dev
Component:edit.module
Category:task
Priority:normal
Assigned:jessebeach
Status:postponed
Issue tags:accessibility, CKEditor in core, Spark, sprint

Issue Summary

Problem/Motivation

We had a huuuuuuuuuuuuuuge discussion on accessibility of the inline editing capability from Spark at the Toronto Accessibility sprint. Here's the outcome of that:

In general, when approaching accessibility, there are two personas you're concerned with:

1) Keyboard-only users, who can see what's going on but don't have a pointing device.
2) Screenreader users, who are keyboard-only users, but without the benefit of being able to see what's going on.

So we need to think of this in terms of what both of those audiences would want to do, without stabbing themselves in the face 500 times. :) So let's step through the flow. I've *bolded the things that need to change, and/or need special accessibility attention.

  1. Browsing through the site, arriving at a page, spotting a typo (nothing special accessibility-wise).
  2. Tab through to the "Edit" toolbar item at the top (we're assuming here that we're moving to Jesse's toolbar design rather than how Edit module works right now) and hit Enter.
  3. This expands the tray, which should show a *Quick edit mode toggle (which should become a "button" type with Aria style of "pressed" when it is toggled on ... we should remove "View" here because then the difference between Edit module's "View" and Node module's "View" is unclear and confusing). Hit Enter to turn it on.
  4. This overlays a white sheen as it does now, and outlines the things on the page that are editable. *We need to style these differently than they are currently, e.g. a dashed outline. Right now they look like all elements have focus and they do not. This is confusing.
  5. *Tabbing from this point only tabs between editables (and then eventually back to the toolbar + quick edit toggle). So you should not be able to tab around to links inside the node body, for example, or on non-editable sidebars, when "Quick edit mode" is on.
  6. *As I tab through in a screenreader, I'll hear something like: "Title field. Editable. Press Enter to edit." (TODO: How to implement this?)
  7. If I hit Enter, the window opens up with the contents of whatever in it. Here there are three different behaviours, depending on the type of field:
    • For a "show me a widget" field, *put the cursor on the first focusable element. Currently, this is the Save button (well, currently, it's the Label but *the Label should not be focusable, but probably eventually this will be the Cancel button when we move Save to the top (?). This is important so that screen reader users can discover that Save/Cancel exists.
    • For a "content editable" field (plain textfield), or a WYSIWYG field, the cursor should be positioned in just before the first character of the text. However, if you click into the field with a pointing device, it should continue to position the cursor directly where you clicked, as it does now.
  8. If I shift-tab from the place I'm at now, *the dialog closes, and I'm back to my pre-existing editable having focus. A screen reader user should hear something like *Title field dialog closed. as this happens. This is equivalent to clicking somewhere off the window for a pointing device.
  9. Similarly, if I tab through all possible fields, without changing any of the field values, *the dialog closes, and the next editable (e.g. Body) now has focus. Once again, a screen reader user hears something like *Title field dialog closed. as this happens. This is equivalent to clicking somewhere off the window for a pointing device.
  10. If I tab through into one of the fields on the window and edit its contents, and then tab out (either by shift+tabbing several times or tab-tabbing several times) I will get a modal dialog that warns me about unsaved changes, and either a "Discard changes" or "Save" option (same as it works now — assuming the modal is accessible, this is fine accessibility-wise). *We'll have to revisit this if/when we move to a single save button + draft revisions option.
  11. For just editing, you tab through, change values, tab through, change values. To save, you either tab once more and invoke the modal dialog that warns you about dropping your changes, OR you shift+tab to go back up to the save button and click it. I noted that this seems a bit odd to rely on the "exception" behaviour for inline editing, and questioned whether we should repeat the save/cancel buttons at the bottom again, but Everett said this is the kind of detail we should test later on once it's committed and tweak from there.

A few technical challenges:

- ARIA has roles like "has pop-up" but not like "is editable." We'll need to figure out a way to explain to people what's happening.
- Need to be able to make things that are normally focusable non-focusable so you can tab between editables.We'll have to leave those elements there with the presentation role, but strip out all of their children dynamically.
- Everett also said that since Drupal 7, where we had to be careful about using more advanced accessibility features such as ARIA roles, but people will have had 3-4 years to upgrade their technology. So in the same way we don't support IE 6 and 7 in D8, we can say we don't support screen readers that don't support ARIA roles, as long as we're dealing with "advanced" editing like this, and not the basic "Edit tab on the Node page" editing.

Proposed resolution

We'll address this issue in three ways:

  1. Make the activation and deactivation of edit mode a one-click operation.
  2. Provide appropriate feedback through auditory means to the user so that the state of the page is expressed sufficiently.
  3. Create a logical tabbing structure in edit mode so that non-sited and keyboard-only users aren't traversing through unrelated parts of the page.

Remaining tasks

#1851046: Edit mode should be activated when clicking the Edit toolbar tab
#1851092: When entering edit mode, inform users through the aria-live aural update interface about the state of page
#1851074: Isolate tabbable fields/links to editable fields and Edit module control components when edit mode is enabled
#1851144: Use <button> for elements that are buttons

User interface changes

TBD.

API changes

None.

Comments

#1

+1

#2

Wow, this is awesome and extremely helpful! Thank you! :)

It'll definitely be an interesting challenge to make all of this work. At the same time, we'll gain a lot of very useful accessibility experience, so that we can make it more accessible from the start in the future :)

#3

I'd *love* to jump in and start making the first dent in making Edit fully accessible (the very first tiny dent was made back at DrupalCon Munich, by setting role="button" where necessary). I do fully understand how it should work from a screenreader user point of view. I do not understand at all yet how it should work from an implementer's point of view.

I'd very much appreciate links to useful references to get started on this. If you say "you'll have to read the entire ARIA spec to be able to productively implement this", that's fine, but I'd like to avoid spending days reading things that won't help me after all.

Below is a point-by-point list to explain my main questions.

  • Point 2: will be provided by #1137920: Fix toolbar on small screen sizes and redesign toolbar for desktop, and is blocked on that being committed.
  • Points 3 & 4: @tkoleary is designing this.
  • Points 5 & 6: I only have an extremely vague idea of how to implement this. Tabindexes come to mind, but more useful references would be most welcome.
  • Point 7: for the "form" editor, Edit should give focus to the "Save" button, but for the "direct" editors (contentEditable or WYSIWYG), Edit should give focus to the text, specifically it should put the cursor before the first word. This distinction makes little sense to me, so please help me understand why this is necessary. Why shouldn't we either always give focus to the "Save" button or always give focus to first editable thingie, whether that's a form field or a piece of text?
  • Points 8 & 9: this ties back to my remark for points 5 & 6. Except that this sounds even more complex: we must make sure that the screen reader speaks a message that is invisible to non-screenreader users. How would that work?
  • Points 10 & 11: no questions for now.

And finally, a general question: if I make sure all of this works well in VoiceOver, will this also work in JAWS etc?

#4

added tag a11y

#5

All remaining tasks in this first pass at creating an aural, keyboard-focused interface for the Edit module have been completed and checked into the 8.x-1.x branch of the Edit module.

You can test the results of this work at the following demo site:

user: tester
password: tester
URL: http://edit.qemistry.us/

Further work on the aural UI will require some refactoring of the Edit module JavaScript. What we would to do now is collect feedback on the current attempt to make this UI accessible. This feedback will form the plan for the second effort after refactoring is completed.

I personally am on a steep learning curve for implementing aural UIs. I've been using ChromeVox for testing and also as a user agent for non-development web browsing. I'm coming to understand the level of effort required to build a solid aural UI; that it's really building another interface to the features of this module. We all want to make this module usable by everyone. Feedback and implementation suggestions or code are truly encouraged.

#6

Project:Edit» Drupal core
Version:8.x-1.x-dev» 8.x-dev
Component:Accessibility» edit.module
Priority:critical» major
Issue tags:+accessibility

Drupal standard profile should be accessible, it looks like we are making good progress. Moving it around - so we can get some eyes on this, now that Edit is in core.

#7

Priority:major» critical

#8

Priority:critical» normal

Unless proven otherwise, I don't believe there are any outstanding a11y problems with inline editing that would qualify as "major". (EDIT: or critical, for that matter. :P) But if I'm incorrect on that count, happy to have this moved back.

#9

Does that link still work? I got "Server not found"

#10

No, but the good news is you can just download 8.x and install it now. :D

#11

Status:active» needs review

Marking as NR, to hopefully start getting some much-needed a11y reviews.

@mgifford: see what webchick said; if you want to try it quickly, then go to http://simplytest.me/project/drupal/8.x.

#12

Much easier to do now.

So in my local test I couldn't access the WYSIWYG without a mouse. Tabbing just jumps right over the CKEditor elements.

Like discussions with BU Editor earlier if there is a way to access it, it needs to be discoverable.
http://drupal.org/node/1306760#comment-5107904

#13

Assigned to:Anonymous» jessebeach
Issue tags:+CKEditor in core

#12: That would be an a11y bug in Edit, not in the WYSIWYG editor (i.e. CKEditor) :) Assigning to jessebeach because she's the best person to answer that. I'll make sure we coordinate with the CKEditor developers because this might lead us to tricky ARIA territory.

Also tagging accordingly.

#14

Issue tags:+Spark

.

#15

Status:needs review» postponed
Issue tags:+sprint

Points 1–4 have been implemented already.

Points 5–9 are now possible to implement thanks to #1913086: [Change notice] Generalize the overlay tabbing management into a utility library. This should only be implemented as soon as #1979784: Factor Create.js and VIE.js out of the Edit module is completed.

Points 10 & 11 are being addressed at #1678002: Edit should provide a usable entity-level toolbar for saving fields.

#16

Issue tags:-a11y

Tags