question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A11y: Accessibility in general and minimal keyboard usability

See original GitHub issue

General

In your (great!) documentation in the accessibility part you currently link to WCAG 3.0 in general but not to ATAG 2.0 (Authoring Tool Accessibility Guidelines) which would be the important part for an editor. Those guidelines should be added.

You write:

Currently, we don’t even provide an interface, so for now that’s totally up to you. But no worries, we’ll provide an interface soon and take accessibility into account early on.

I know that Tiptap’s concept is to be headless and that the visual and semantical representation of the editor is not part of TipTap’s core. But I think, that in the short run the demos in the docs (being best practices) should be as accessible as possible, because…

  • …devs use your examples in their projects and therefore lots of projects would be more accessible from the start
  • …people relying on good accessibility should be able to try your demos as well
  • …there are editors like CKEditor, that are a11y-proven – and we should show, that TipTap can provide best accessibility as well

Keyboard usability

One central part for accessibility is the usability with keyboard. I already opened https://github.com/ueberdosis/tiptap-next/issues/239 to provide focus styles but the demo editors should provide the following minimal functions, too:

  1. The whole editor area (toolbar + editable content) should be selectable with keyboard (e. g. with tabindex="0" and an additional class to provide the needed focus styles) . Currently you can only select buttons in the toolbar and the content area. (This will be needed later for some ARIA stuff.)
  2. While the editor or anything inside is being focused, the first button in the toolbar should be selectable with Alt-F10. (After checking TinyMCE, CKEditor and WordPress’ Gutenberg Editor this seems to be industry standard). Important: The current selection in the editor should be untouched!
  3. While using the toolbar clicking Esc should bring you back to the last selection in the content area.

Of course this is just as minimal starting point and there are lots of things to consider, e. g.:

…just to name a few. I hope to find more time to help out. 😃

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:16
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
cadarscommented, May 15, 2021

(Adding this here instead of creating another issue)

Since tiptap doesn’t use a regular semantic <textarea> element, I believe it would be good to give the editable .ProseMirror div the following attributes by default:

role="textbox" aria-multiline="true"

I’ve been able to pass these attributes as editorProps for the time being.

Additionally, for the read-only state (contenteditable="false"), aria-readonly="true" needs to be added?

Is it an issue that should be reported to the Prosemirror project instead? Reference: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/textbox_role

1reaction
hanspagelcommented, May 15, 2021

Thanks, grest suggestion! From reading the link, I’d say we should add aria-placeholder to the placeholder extension too.

@philippkuehn upstream issue, tiptap core default or tiptap default extension?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Checklist - The A11Y Project
The issues this checklist prompts you to check for covers a wide range of disability conditions. There is no such thing as “perfect...
Read more >
Keyboard Compatibility | Web Accessibility Initiative (WAI) - W3C
Short video about keyboard compatibility for web accessibility - what is it, who depends on it, and what needs to happen to make...
Read more >
Focus & Keyboard Operability - Usability & Web Accessibility
For a site to be accessible, it must be easy for keyboard-only users to perceive where focus is at all times. There must...
Read more >
A11y Requirements — The Dojo Toolkit - Reference Guide
Below are the 5 basic Dojo Accessibility requirements which must be met when creating and styling ... All functionality is usable via the...
Read more >
A guide to designing accessible, WCAG-compliant focus ...
Unfortunately, keyboard users experience the Web in a similarly frustrating manner too often. Their equivalent of a mouse cursor is usually ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found