- ARIA Attributes
- Keyboard Navigation
- Implementing Accessibility Best Practices
- See Also
Contact Support
Accessibility in the React Markdown Editor Component
26 Mar 202524 minutes to read
The React Markdown Editor is designed to be fully accessible, following WAI-ARIA specifications and implementing ARIA roles, states, and properties. These accessibility features ensure that the editor is user-friendly for individuals relying on assistive technologies (AT) or keyboard navigation.
The following table summarizes the accessibility support of the Markdown Editor component:



ARIA Attributes
The toolbar in the Markdown Editor is assigned the role of ‘Toolbar’ and includes the following attributes.
Property | Functionalities |
---|---|
role=”toolbar” | This attribute added to the ToolBar element describes the actual role of the element. |
aria-orientation | Indicates the ToolBar orientation. Default value is horizontal . |
aria-haspopup | Indicates the popup mode of the Toolbar. Default value is false. When popup mode is enabled, attribute value has to be changed to true . |
aria-disabled | Indicates the disabled state of the toolbar. |
aria-owns | Identifies an element to define a visual, functional, or contextual parent/child relationship between DOM elements when the DOM hierarchy cannot represent the relationship. In the Markdown Editor, the attribute contains the ID of the Markdown Editor to indicate the popup as a child element. |
For more details on Toolbar ARIA attributes, refer to the Accessibility of Toolbar
documentation.
- The Markdown Editor element is assigned the role of
application
.
Property | Functionalities |
---|---|
role=”application” | This attribute added to the Markdown Editor element describes the actual role of the element. |
aria-disabled | Indicates the disabled state of the ToolBar. |
[Class-component]
import { MarkdownEditor, Inject, RichTextEditorComponent, Toolbar, Link, Image, Table } from '@syncfusion/ej2-react-richtexteditor';
import * as React from 'react';
class App extends React.Component {
rteValue = "In Rich Text Editor, you click the toolbar buttons to format the words and the changes are visible immediately. Markdown is not like that. When you format the word in Markdown format, you need to add Markdown syntax to the word to indicate which words and phrases should look different from each other. Rich Text Editor supports markdown editing when the editorMode set as **markdown** and using both *keyboard interaction* and *toolbar action*, you can apply the formatting to text. You can add our own custom formation syntax for the Markdown formation, [sample link](https://ej2.syncfusion.com/home/). The third-party library <b>Marked</b> is used in this sample to convert markdown into HTML content.";
toolbarSettings = {
items: [
'Bold',
'Italic',
'StrikeThrough',
'SuperScript',
'SubScript',
'|',
'Formats',
'|',
'OrderedList',
'UnorderedList',
'CreateLink',
'Image',
'CreateTable',
'|',
'Undo',
'Redo',
],
};
render() {
return (<RichTextEditorComponent editorMode={'Markdown'} value={this.rteValue} toolbarSettings={this.toolbarSettings}>
<Inject services={[Toolbar, MarkdownEditor, Link, Image, Table]} />
</RichTextEditorComponent>);
}
}
export default App;
import { MarkdownEditor, Inject, RichTextEditorComponent, Toolbar, Link, Image, Table } from '@syncfusion/ej2-react-richtexteditor';
import * as React from 'react';
class App extends React.Component<{},{}> {
private rteValue:string = "In Rich Text Editor, you click the toolbar buttons to format the words and the changes are visible immediately. Markdown is not like that. When you format the word in Markdown format, you need to add Markdown syntax to the word to indicate which words and phrases should look different from each other. Rich Text Editor supports markdown editing when the editorMode set as **markdown** and using both *keyboard interaction* and *toolbar action*, you can apply the formatting to text. You can add our own custom formation syntax for the Markdown formation, [sample link](https://ej2.syncfusion.com/home/). The third-party library <b>Marked</b> is used in this sample to convert markdown into HTML content.";
public toolbarSettings: object = {
items: [
'Bold',
'Italic',
'StrikeThrough',
'SuperScript',
'SubScript',
'|',
'Formats',
'|',
'OrderedList',
'UnorderedList',
'CreateLink',
'Image',
'CreateTable',
'|',
'Undo',
'Redo',
],
}
public render() {
return (
<RichTextEditorComponent editorMode={'Markdown'} value={this.rteValue} toolbarSettings={this.toolbarSettings}>
<Inject services={[Toolbar, MarkdownEditor, Link, Image, Table]} />
</RichTextEditorComponent>
);
}
}
export default App;
[Functional-component]
import { MarkdownEditor, Inject, RichTextEditorComponent, Toolbar, Link, Image, Table } from '@syncfusion/ej2-react-richtexteditor';
import * as React from 'react';
function App() {
let rteValue = "In Rich Text Editor, you click the toolbar buttons to format the words and the changes are visible immediately. Markdown is not like that. When you format the word in Markdown format, you need to add Markdown syntax to the word to indicate which words and phrases should look different from each other. Rich Text Editor supports markdown editing when the editorMode set as **markdown** and using both *keyboard interaction* and *toolbar action*, you can apply the formatting to text. You can add our own custom formation syntax for the Markdown formation, [sample link](https://ej2.syncfusion.com/home/). The third-party library <b>Marked</b> is used in this sample to convert markdown into HTML content.";
const toolbarSettings = {
items: [
'Bold',
'Italic',
'StrikeThrough',
'SuperScript',
'SubScript',
'|',
'Formats',
'|',
'OrderedList',
'UnorderedList',
'CreateLink',
'Image',
'CreateTable',
'|',
'Undo',
'Redo',
],
};
return (<RichTextEditorComponent value={rteValue} editorMode={'Markdown'} toolbarSettings={toolbarSettings}>
<Inject services={[Toolbar, MarkdownEditor, Link, Image, Table ]}/>
</RichTextEditorComponent>);
}
export default App;
import { MarkdownEditor, Inject, RichTextEditorComponent, Toolbar, Link, Image, Table } from '@syncfusion/ej2-react-richtexteditor';
import * as React from 'react';
function App() {
let rteValue: string = "In Rich Text Editor, you click the toolbar buttons to format the words and the changes are visible immediately. Markdown is not like that. When you format the word in Markdown format, you need to add Markdown syntax to the word to indicate which words and phrases should look different from each other. Rich Text Editor supports markdown editing when the editorMode set as **markdown** and using both *keyboard interaction* and *toolbar action*, you can apply the formatting to text. You can add our own custom formation syntax for the Markdown formation, [sample link](https://ej2.syncfusion.com/home/). The third-party library <b>Marked</b> is used in this sample to convert markdown into HTML content.";
const toolbarSettings: object = {
items: [
'Bold',
'Italic',
'StrikeThrough',
'SuperScript',
'SubScript',
'|',
'Formats',
'|',
'OrderedList',
'UnorderedList',
'CreateLink',
'Image',
'CreateTable',
'|',
'Undo',
'Redo',
],
}
return (
<RichTextEditorComponent value={rteValue} editorMode={'Markdown'} toolbarSettings={toolbarSettings}>
<Inject services={[Toolbar, MarkdownEditor, Link, Image, Table]} />
</RichTextEditorComponent>
);
}
export default App;
Keyboard Navigation
The Markdown Editor component followed the keyboard interaction guideline, making it easy for people who use assistive technologies (AT) and those who completely rely on keyboard navigation. The following keyboard shortcuts are supported by the Markdown Editor component.
For more details on keyboard navigation, refer to the Keyboard support documentation.
Customizing Shortcut Keys
You can customize shortcut keys using the formatter property.This allows you to configure custom key combinations for various actions in the Markdown Editor. For example, you can set ctrl+q
to open the Insert Hyperlink
dialog.
[Class-component]
import {MarkdownEditor, MarkdownFormatter, IMarkdownFormatterModel, Image, Inject, Link, Table, RichTextEditorComponent, Toolbar } from '@syncfusion/ej2-react-richtexteditor';
import * as React from 'react';
class App extends React.Component {
rteValue = "In Rich Text Editor, you click the toolbar buttons to format the words and the changes are visible immediately. Markdown is not like that. When you format the word in Markdown format, you need to add Markdown syntax to the word to indicate which words and phrases should look different from each other. Rich Text Editor supports markdown editing when the editorMode set as **markdown** and using both *keyboard interaction* and *toolbar action*, you can apply the formatting to text. You can add our own custom formation syntax for the Markdown formation, [sample link](https://ej2.syncfusion.com/home/). The third-party library <b>Marked</b> is used in this sample to convert markdown into HTML content.";
customHTMLModel = {
// formatter is used to configure the custom key
keyConfig: {
'insert-link': 'ctrl+q', // confite the desired key
}
};
toolbarSettings = {
items: [
'Bold',
'Italic',
'StrikeThrough',
'SuperScript',
'SubScript',
'|',
'Formats',
'|',
'OrderedList',
'UnorderedList',
'CreateLink',
'Image',
'CreateTable',
'|',
'Undo',
'Redo',
],
};
formatter = new MarkdownFormatter(this.customHTMLModel);
render() {
return (<RichTextEditorComponent value={this.rteValue} toolbarSettings={this.toolbarSettings} editorMode={'Markdown'} formatter={this.formatter}>
<Inject services={[Toolbar, Image, Link,Table, MarkdownEditor]} />
</RichTextEditorComponent>);
}
}
export default App;
import {MarkdownEditor, MarkdownFormatter, IMarkdownFormatterModel, Image, Inject, Link, Table, RichTextEditorComponent, Toolbar } from '@syncfusion/ej2-react-richtexteditor';
import * as React from 'react';
class App extends React.Component<{},{}> {
private rteValue: string = "In Rich Text Editor, you click the toolbar buttons to format the words and the changes are visible immediately. Markdown is not like that. When you format the word in Markdown format, you need to add Markdown syntax to the word to indicate which words and phrases should look different from each other. Rich Text Editor supports markdown editing when the editorMode set as **markdown** and using both *keyboard interaction* and *toolbar action*, you can apply the formatting to text. You can add our own custom formation syntax for the Markdown formation, [sample link](https://ej2.syncfusion.com/home/). The third-party library <b>Marked</b> is used in this sample to convert markdown into HTML content.";
public customHTMLModel: IMarkdownFormatterModel = {
// formatter is used to configure the custom key
keyConfig: {
'insert-link': 'ctrl+q', // confite the desired key
}
};
public toolbarSettings: object = {
items: [
'Bold',
'Italic',
'StrikeThrough',
'SuperScript',
'SubScript',
'|',
'Formats',
'|',
'OrderedList',
'UnorderedList',
'CreateLink',
'Image',
'CreateTable',
'|',
'Undo',
'Redo',
],
}
public formatter: any = new MarkdownFormatter(this.customHTMLModel);
public render() {
return (
<RichTextEditorComponent formatter={this.formatter} toolbarSettings={this.toolbarSettings} editorMode={'Markdown'} value={this.rteValue}>
<Inject services={[Toolbar, Image, Link,Table, MarkdownEditor]} />
</RichTextEditorComponent>
);
}
}
export default App;
[Functional-component]
import { MarkdownEditor, MarkdownFormatter, Image, Inject, Link, Table, RichTextEditorComponent, Toolbar } from '@syncfusion/ej2-react-richtexteditor';
import * as React from 'react';
function App() {
let rteValue = "In Rich Text Editor, you click the toolbar buttons to format the words and the changes are visible immediately. Markdown is not like that. When you format the word in Markdown format, you need to add Markdown syntax to the word to indicate which words and phrases should look different from each other. Rich Text Editor supports markdown editing when the editorMode set as **markdown** and using both *keyboard interaction* and *toolbar action*, you can apply the formatting to text. You can add our own custom formation syntax for the Markdown formation, [sample link](https://ej2.syncfusion.com/home/). The third-party library <b>Marked</b> is used in this sample to convert markdown into HTML content.";
let customHTMLModel = {
// formatter is used to configure the custom key
keyConfig: {
'insert-link': 'ctrl+q', // confite the desired key
}
};
const toolbarSettings = {
items: [
'Bold',
'Italic',
'StrikeThrough',
'SuperScript',
'SubScript',
'|',
'Formats',
'|',
'OrderedList',
'UnorderedList',
'CreateLink',
'Image',
'CreateTable',
'|',
'Undo',
'Redo',
],
};
let formatter = new MarkdownFormatter(customHTMLModel);
return (<RichTextEditorComponent formatter={formatter} editorMode={'Markdown'} value={rteValue} toolbarSettings={toolbarSettings}>
<Inject services={[Toolbar, Image, Link, Table, MarkdownEditor]}/>
</RichTextEditorComponent>);
}
export default App;
import {MarkdownEditor, MarkdownFormatter, IMarkdownFormatterModel, Image, Inject, Link, Table, RichTextEditorComponent, Toolbar } from '@syncfusion/ej2-react-richtexteditor';
import * as React from 'react';
function App() {
let rteValue:string = "In Rich Text Editor, you click the toolbar buttons to format the words and the changes are visible immediately. Markdown is not like that. When you format the word in Markdown format, you need to add Markdown syntax to the word to indicate which words and phrases should look different from each other. Rich Text Editor supports markdown editing when the editorMode set as **markdown** and using both *keyboard interaction* and *toolbar action*, you can apply the formatting to text. You can add our own custom formation syntax for the Markdown formation, [sample link](https://ej2.syncfusion.com/home/). The third-party library <b>Marked</b> is used in this sample to convert markdown into HTML content.";
let customHTMLModel: IMarkdownFormatterModel = {
// formatter is used to configure the custom key
keyConfig: {
'insert-link': 'ctrl+q', // confite the desired key
}
};
const toolbarSettings: object = {
items: [
'Bold',
'Italic',
'StrikeThrough',
'SuperScript',
'SubScript',
'|',
'Formats',
'|',
'OrderedList',
'UnorderedList',
'CreateLink',
'Image',
'CreateTable',
'|',
'Undo',
'Redo',
],
}
let formatter: any = new MarkdownFormatter(customHTMLModel);
return (
<RichTextEditorComponent formatter={formatter} value={rteValue} editorMode={'Markdown'} toolbarSettings={toolbarSettings}>
<Inject services={[Toolbar, Image, Link,Table, MarkdownEditor]} />
</RichTextEditorComponent>
);
}
export default App;
Implementing Accessibility Best Practices
The Markdown Editor component’s accessibility levels are ensured through an accessibility-checker and axe-core software tools during automated testing.
The accessibility compliance of the Rich Text Editor component is shown in the following sample. Open the sample in a new window to evaluate the accessibility of the Rich Text Editor component with accessibility tools.