-
Notifications
You must be signed in to change notification settings - Fork 665
DataGrid: Fix the header filter\'s aria-label when column's caption has a "\n" character (T1318766). Normalization of aria attributes of elements. #32249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 26_1
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes an issue where DataGrid header filter aria-labels contain newline characters when column captions include \n, improving accessibility. The solution introduces a centralized normalization approach for all aria attributes by enhancing the setAria method to replace multiple whitespace characters (including newlines) with a single space.
Changes:
- Enhanced the
setAriamethod inm_modules.tsto normalize whitespace in aria attribute values and added TypeScript type safety - Refactored all direct aria attribute assignments across grid modules to use the centralized
setAriamethod - Updated
renderSummaryCellfunction to accept and use asetAriacallback parameter for consistent aria attribute handling - Added Jest integration test to verify newline normalization in header filter aria-labels
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
packages/devextreme/js/__internal/grids/grid_core/m_modules.ts |
Enhanced setAria method with whitespace normalization logic, added TypeScript types, and removed unnecessary eslint-disable comments |
packages/devextreme/js/__internal/grids/grid_core/header_filter/m_header_filter_core.ts |
Replaced direct .attr() calls with setAria() for header filter indicator aria attributes |
packages/devextreme/js/__internal/grids/grid_core/validating/m_validating.ts |
Replaced direct .attr() calls with setAria() for validation-related aria attributes |
packages/devextreme/js/__internal/grids/grid_core/master_detail/m_master_detail.ts |
Replaced direct .attr() call with setAria() for master detail aria-roledescription |
packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts |
Replaced direct .attr() call with setAria() for toolbar aria-label |
packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts |
Replaced direct .attr() calls with setAria() for error message aria attributes |
packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_form_based.ts |
Replaced direct .attr() call with setAria() for edit form aria-label, removed unused eslint-disable comment |
packages/devextreme/js/__internal/grids/grid_core/editing/m_editing.ts |
Replaced direct .attr() call with setAria() and improved code structure with explicit conditional |
packages/devextreme/js/__internal/grids/grid_core/adaptivity/m_adaptivity.ts |
Replaced direct .attr() call with setAria() and added defensive length check |
packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts |
Updated renderSummaryCell function signature to accept setAria callback and modified all call sites to pass bound method |
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/summaryModule.tests.js |
Updated test calls to renderSummaryCell to include required noop parameter for setAria callback |
packages/devextreme/js/__internal/grids/grid_core/__tests__/grid.integration.test.ts |
Added new Jest integration test verifying newline normalization in header filter aria-labels |
packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts
Outdated
Show resolved
Hide resolved
…as a "\n" character (T1318766). Normalization of aria attributes of elements. (DevExpress#32226) Co-authored-by: Alyar <>
c2cc9c4 to
409b928
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
| value: string | number | boolean | undefined, | ||
| $target: dxElementWrapper, | ||
| ) { | ||
| if (!isDefined(value)) { |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isDefined function is used but not imported. You need to add the import statement at the top of the file: import { isDefined } from '@js/core/utils/type';
409b928 to
ab1d0d9
Compare
No description provided.