Accessibility & Languages

An accessibility checker authors can run and repair from, language-of-parts markup for WCAG 2.1 SC 3.1.2, right-to-left text with an RTL editor interface, read aloud, and ruby annotations for furigana and pinyin. The document below already contains something for each to act on.

Visitor information

Opening hours are posted at the entrance. As the guide said, c'est la vie - some galleries close early on Mondays.

مرحبا بكم في المتحف. المعرض مفتوح كل يوم.

The Japanese word for kanji is 漢字.

Status

Loading the editor...

Demo Code

<script src="/richtexteditor/rte.js"></script>
<script src="/richtexteditor/plugins/all_plugins.js"></script>

<div id="div_editor1">...</div>

<script>
  var editor1 = new RichTextEditor("#div_editor1");

  // --- accessibility checker (also on the default toolbar) -------------
  editor1.accessibilityChecker.run();        // audit the document
  editor1.accessibilityChecker.getIssues();  // -> [issue, ...]
  editor1.accessibilityChecker.open();       // the checker panel, with repairs

  // --- language of parts (WCAG 2.1 SC 3.1.2) ---------------------------
  editor1.setTextLanguage("fr");             // wraps the selection with lang="fr"
  editor1.getMarkedLanguages();

  // --- right-to-left ---------------------------------------------------
  editor1.autoDetectTextDirection();         // dir per block, from its first strong character
  editor1.setTextDirection("rtl");           // or set it explicitly on the current block
  editor1.setRtlUserInterface(true);         // flip the toolbar, menus and dialogs too

  // --- read aloud (browser Web Speech API) -----------------------------
  editor1.readAloud();
  editor1.stopReadAloud();

  // --- ruby annotation (also on the default toolbar) -------------------
  editor1.ruby.add("かんじ");               // reading above the selected text
</script>