Vue Popover - Accessibility

Accessibility Features Overview

NOTE
The overall accessibility level of your application depends on the Popover features that you use.
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.

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
index.js
const popover = $('#popover').dxPopover({
    // ...
    onShowing: function (e) {
        var $overlayContent = $(e.component.content()).parent()
        $overlayContent.attr("role", "dialog");
    },
}).dxPopover('instance');
Angular
app.component.html
app.component.ts
<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
App.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
App.js
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
index.js
$('#popover').dxPopover({
    // ...
    contentTemplate: () => '<div id="content" tabIndex="1">Content template</div>',
    onShown: function (e) {
        $('#content').focus();
    },
});
Angular
app.component.html
app.component.ts
<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
App.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
App.js
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;