Accessibility Features Overview
| Accessibility Requirement | Support Level |
|---|---|
| Right-to-Left Support | |
| Keyboard Navigation Support | |
| Screen Reader Support | |
| Contrast Color Theme | |
| Mobile Device Support | |
| Lighthouse Accessibility Validation | |
| Axe Accessibility Validation | |
| WAVE Accessibility Validation | |
| Section 508 Support | |
| WCAG 2.x Support |
- - All component features meet the requirement
- - Some component features may not meet the requirement
- - Accessibility requirement is not supported
Accessibility Standards Compliance
The HTML Editor component meets a variety of Section 508 and WCAG 2.x compliance standards. Known exceptions:
| Section 508 criteria | WCAG 2.x criteria | Exception description |
|---|---|---|
| 501 (Web)(Software) 504.2 (Authoring Tool) 602.3 (Support Docs) | 1.4.3 Contrast (Minimum) (Level AA) 1.4.11 Non-text Contrast (Level AA 2.1 and 2.2) | HTML Editor does not support Windows High Contrast themes. |
| 501 (Web)(Software) 504.2 (Authoring Tool) 602.3 (Support Docs) | 2.1.1 Keyboard (Level A) 11.5.2.12 Execution of available actions | Users cannot resize images, Popup, and Resizable controls within HTML Editor. |
| - | 4.1.2 Name, Role, Value | NVDA does not pronounce the state of the button in the toolbar (active or not). |
| 504.2.2 PDF Export | - | If you export content from an HTML Editor to PDF, the following issues occur in the resulting document:
|
The component also complies with the European Accessibility Act (EAA) and Americans with Disabilities Act (ADA) directives.
Keyboard Navigation
A user can use the following keys to interact with the HTML Editor component:
| PC | Mac | Action |
|---|---|---|
| Ctrl + C | ⌘ + C | Copy |
| Ctrl + V | ⌘ + V | Paste |
| Ctrl + Z | ⌘ + Z | Undo |
| Ctrl + Y | ⌘ + Y | Redo |
| Ctrl + A | ⌘ + A | Select All |
| Ctrl + B | ⌘ + B | Bold |
| Ctrl + I | ⌘ + I | Italic |
| Enter | Insert a line break (a new paragraph) | |
| Shift + Enter | Insert a line break (in the same paragraph) | |
| Tab |
| |
| Shift + Tab |
| |
| Arrow Keys |
| |
| Home End | Move focus to the first/last item in the toolbar. | |
| Ctrl + Shift + Up Arrow | ⌘ + Shift + Up Arrow | Focus the previous focusable element on the page or the HTML Editor toolbar (if configured) |
| Ctrl + Shift + Down Arrow | ⌘ + Shift + Down Arrow | Focus the next focusable element on the page |
| Enter | Move the cursor outside the table (when in the last row) | |
| Esc | Close active dialog | |
| Enter | Apply active dialog data | |
Configure customizeModules to toggle keyboard.inlineTabInsertion:
- <dx-html-editor
- [customizeModules]="customizeQuillModules">
- </dx-html-editor>
- import { Component } from '@angular/core';
- import { DxHtmlEditorModule } from 'devextreme-angular/ui/html-editor';
- // ...
- export class AppComponent {
- customizeQuillModules(config) {
- config.keyboard.inlineTabInsertion = true;
- }
- }
To navigate between toolbar items using the Tab key, disable allowKeyboardNavigation in HtmlEditor Toolbar instances. Call dxToolbar.defaultOptions() as follows:
- import dxToolbar from "devextreme/ui/toolbar";
- import { type DxToolbarTypes } from "devextreme-angular/ui/toolbar";
- // ...
- export class AppComponent {
- constructor() {
- dxToolbar.defaultOptions({
- options: {
- onInitialized(e: DxToolbarTypes.InitializedEvent) {
- if (e.element?.closest('.dx-htmleditor')) {
- e.component?.option('allowKeyboardNavigation', false);
- }
- }
- }
- })
- }
- }
Replace .dx-htmleditor with a component ID or class to modify keyboard navigation behavior in a specific component only.
Use the registerKeyHandler(key, handler) method to implement a custom handler for a key.
- import { ViewChild, AfterViewInit } from '@angular/core';
- import { DxHtmlEditorComponent } from 'devextreme-angular/ui/html-editor';
- @Component({
- imports: [DxHtmlEditorComponent],
- // ...
- })
- export class AppComponent implements AfterViewInit {
- @ViewChild(DxHtmlEditorComponent, { static: false }) htmlEditor!: DxHtmlEditorComponent;
- // Prior to Angular 8
- // @ViewChild(DxHtmlEditorComponent) htmlEditor: DxHtmlEditorComponent;
- ngAfterViewInit () {
- this.htmlEditor.instance.registerKeyHandler('backspace', function(e) {
- // The argument "e" contains information about the event
- });
- this.htmlEditor.instance.registerKeyHandler('space', function(e) {
- // ...
- });
- }
- }
Screen Reader Support
The HTML Editor component supports screen readers and complies to WAI-ARIA standards.