T1318244 - DataGrid - The "Certain ARIA roles must be contained by particular parents" error occurs if the grid has no data#32348
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes an accessibility (Axe) violation in DataGrid when it renders with no data by ensuring the grid container still receives the proper ARIA role, and updates e2e a11y coverage/dependencies accordingly.
Changes:
- Always set the grid ARIA
roleon the RowsView content element, even when the grid is empty. - Add/adjust DataGrid accessibility e2e coverage for “no data” scenarios.
- Bump
axe-coreused by TestCafe a11y tests from4.10.3to4.11.1(and update lockfile).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/devextreme/js/__internal/grids/grid_core/views/m_rows_view.ts |
Ensures the grid role is applied regardless of data presence to prevent ARIA parent/child role violations. |
e2e/testcafe-devextreme/tests/accessibility/dataGrid/common.ts |
Adds a new “empty grid” a11y test case and adjusts the Axe config selection logic. |
e2e/testcafe-devextreme/package.json |
Updates axe-core dev dependency to 4.11.1. |
pnpm-lock.yaml |
Lockfile updates corresponding to the axe-core bump. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| const a11yCheckConfig = isFluent() ? {} : { runOnly: 'color-contrast' }; | ||
|
|
There was a problem hiding this comment.
a11yCheckConfig logic changed from isMaterialBased() ? { runOnly: 'color-contrast' } : {} to isFluent() ? {} : { runOnly: 'color-contrast' }. This means non-Fluent runs (e.g., --theme generic.light when running the dataGrid folder) will now only execute the color-contrast rule and skip the rest of the Axe checks, which is a significant reduction in a11y coverage compared to the previous behavior. If the intent is only to keep the Material theme limited to color-contrast, consider keying this condition off isMaterial() (or otherwise preserving full checks for non-material themes) while still enabling full checks for Fluent.
e2e/testcafe-devextreme/package.json
Outdated
| "@testcafe-community/axe": "3.5.0", | ||
| "@types/jquery": "catalog:", | ||
| "axe-core": "4.10.3", | ||
| "axe-core": "4.11.1", |
There was a problem hiding this comment.
please, update axe-core version in other packages as well
actually, we can add it to catalog to keep in always in sync
No description provided.