diff --git a/apps/demos/testing/common.test.ts b/apps/demos/testing/common.test.ts index 9493959f3ad1..0bc4847bc7f2 100644 --- a/apps/demos/testing/common.test.ts +++ b/apps/demos/testing/common.test.ts @@ -58,6 +58,18 @@ const writeCspReport = (testName: string, framework: string, violations: any[]) const getIgnoredRules = (testName) => { const ignoredRules = []; + // False positive: axe-core 4.11 tightened scrollable-region-focusable to require tabindex on + // overflow elements, but .dx-scrollable-container in these components handles keyboard navigation + // at the widget level rather than on the container element itself. + // Only suppressed for components confirmed to trigger this false positive. + const scrollableFalsePositiveComponents = [ + 'Chat', 'Diagram', 'Gantt', 'PivotGrid', 'Scheduler', + 'ScrollView', 'Sortable', 'TileView', 'TreeView', + ]; + if (scrollableFalsePositiveComponents.includes(testName.split('-')[0])) { + ignoredRules.push('scrollable-region-focusable'); + } + if ((isMaterial() || isFluent()) && [ // False positive: contrast rules do not apply to disabled tags @@ -68,6 +80,25 @@ const getIgnoredRules = (testName) => { 'CardView-FieldTemplate', // False positive: contrast rules do not apply to read-only editors on the custom option panel background 'VectorMap-DynamicViewport', + // False positive: Diagram uses custom shape colors that do not meet contrast requirements + 'Diagram-Adaptability', + 'Diagram-AdvancedDataBinding', + 'Diagram-Containers', + 'Diagram-CustomShapesWithIcons', + 'Diagram-CustomShapesWithTemplates', + 'Diagram-CustomShapesWithTemplatesWithEditing', + 'Diagram-CustomShapesWithTexts', + 'Diagram-ImagesInShapes', + 'Diagram-ItemSelection', + 'Diagram-NodesAndEdgesArrays', + 'Diagram-NodesArrayHierarchicalStructure', + 'Diagram-NodesArrayPlainStructure', + 'Diagram-OperationRestrictions', + 'Diagram-Overview', + 'Diagram-ReadOnly', + 'Diagram-SimpleView', + 'Diagram-UICustomization', + 'Diagram-WebAPIService', ].includes(testName) ) { ignoredRules.push('color-contrast'); @@ -75,7 +106,6 @@ const getIgnoredRules = (testName) => { const specificRules = { 'DataGrid-EditStateManagement': ['aria-required-parent'], - 'DataGrid-RemoteCRUDOperations': ['scrollable-region-focusable'], 'Diagram-Adaptability': ['aria-dialog-name', 'label'], 'Diagram-AdvancedDataBinding': ['aria-dialog-name', 'label'],