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 Popover 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) |
Popover does not support Windows High Contrast themes. |
501 (Web)(Software) 504.2 (Authoring Tool) 602.3 (Support Docs) |
4.1.2 Name, Role, Value (Level A) | NVDA does not pronounce content when Popover is opened. |
- | 1.4.13 Content on Hover or Focus (Level AA 2.1 and 2.2) | Popover does not remain visible on hover and cannot be dismissed using keyboard navigation. |
Screen Reader Support
The Popover component supports screen readers and complies to WAI-ARIA standards.
The default ARIA role for Popover is tooltip. If you put focusable content inside Popover, you may want to change the role to dialog. To implement this functionality, use the onShowing event handler:
jQuery
const popover = $('#popover').dxPopover({ // ... onShowing: function (e) { var $overlayContent = $(e.component.content()).parent() $overlayContent.attr("role", "dialog"); }, }).dxPopover('instance');
Angular
<dx-popover ... (onShowing)="onShowingHandler($event)" > </dx-popover>
import { Component } from "@angular/core"; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { onShowingHandler(e) { const overlayContent = e.component.content().parentElement; overlayContent.setAttribute("role", "dialog"); } }
Vue
<template> <DxPopover ... @showing="onShowingHandler" /> </template> <script> import { DxPopover } from 'devextreme-vue/Popover'; export default { components: { DxPopover }, methods: { onShowingHandler(e) { const overlayContent = e.component.content().parentElement; overlayContent.setAttribute("role", "dialog"); }, }, }; </script>
React
import React from 'react'; import Popover from 'devextreme-react/popover'; const onShowingHandler = (e) => { const overlayContent = e.component.content().parentElement; overlayContent.setAttribute("role", "dialog"); }; const App = () => { return ( <Popover ... onShowing={onShowingHandler} /> ); }; export default App;
Accessibility readers do not notify users when the Popover is opened since it is not a focusable element. To receive reader notifications for an open dialog, programmatically focus an element in Popover after its activation:
jQuery
$('#popover').dxPopover({ // ... contentTemplate: () => '<div id="content" tabIndex="1">Content template</div>', onShown: function (e) { $('#content').focus(); }, });
Angular
<dx-popover ... (onShown)="onShownHandler($event)" > <div #contentElement id="content" tabindex="1"> Content template </div> </dx-popover>
import { Component, ElementRef, ViewChild } from "@angular/core"; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { @ViewChild('contentElement') contentElement!: ElementRef; onShownHandler(e) { this.contentElement.nativeElement.focus(); } }
Vue
<template> <DxPopover ... @shown="onShownHandler" > <div id="content" tabindex="1" ref="contentRef"> Content template </div> </DxPopover> </template> <script> import { DxPopover } from 'devextreme-vue/Popover'; export default { components: { DxPopover }, methods: { onShownHandler() { if (this.contentRef) { this.contentRef.focus(); } }, }, mounted() { this.contentRef = this.$refs.contentRef; }, }; </script>
React
import React, { useRef } from 'react'; import Popover from 'devextreme-react/popover'; const App = () => { const contentRef = useRef(null); const onShownHandler = () => { if (contentRef.current) { contentRef.current.focus(); } }; return ( <Popover ... onShown={onShownHandler} > <div id="content" tabIndex="1" ref={contentRef}> Content template </div> </Popover> ); }; export default App;
If you have technical questions, please create a support ticket in the DevExpress Support Center.