Wcag
WCAGPlugin
WCAG Plugin is responsible for enhancing the accessibility features of the RevoGrid component. It ensures that the grid is fully compliant with Web Content Accessibility Guidelines (WCAG) 2.1. This plugin should be the last plugin you add, as it modifies the grid’s default behavior.
The WCAG Plugin performs the following tasks:
- Sets the ‘dir’ attribute to ‘ltr’ for left-to-right text direction.
- Sets the ‘role’ attribute to ‘treegrid’ for treelike hierarchical structure.
- Sets the ‘aria-keyshortcuts’ attribute to ‘Enter’ and ‘Esc’ for keyboard shortcuts.
- Adds event listeners for keyboard navigation and editing.
By default, the plugin adds ARIA roles and properties to the grid elements, providing semantic information for assistive technologies. These roles include ‘grid’, ‘row’, and ‘gridcell’. The plugin also sets ARIA attributes such as ‘aria-rowindex’, ‘aria-colindex’, and ‘aria-selected’.
The WCAG Plugin ensures that the grid is fully functional and usable for users with various disabilities, including visual impairments, deaf-blindness, and cognitive disabilities.
Note: The WCAG Plugin should be added as the last plugin in the list of plugins, as it modifies the grid’s default behavior and may conflict with other plugins if added earlier.
class WCAGPlugin {}