-
Notifications
You must be signed in to change notification settings - Fork 600
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
DataGrid - Contrast between icons in the Filter Row menu and their background doesn't comply with WCAG accessibility standards (T1257970) #28522
Open
tongsonbarbs
wants to merge
19
commits into
DevExpress:24_2
Choose a base branch
from
tongsonbarbs:T1257970_24_2
base: 24_2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
ffe7893
initial commit
tongsonbarbs d6d6edc
add test
tongsonbarbs 8ba0aa8
Merge branch '24_2' of https://github.com/DevExpress/DevExtreme into …
tongsonbarbs b771093
add etalons
tongsonbarbs 6ee2c46
added accurate test
tongsonbarbs 0bb9421
remove unused import
tongsonbarbs 7e70179
fix hover
tongsonbarbs edcfc62
avoid multiple change theme
tongsonbarbs 3472e7f
add hover check before screenshot
tongsonbarbs 8402950
recorrect etalons
tongsonbarbs 9554eb6
remove unnecessary
tongsonbarbs a98e1ab
add final etalons
tongsonbarbs dafd88d
modify old test
tongsonbarbs 1060edd
change text
tongsonbarbs ede1e06
demo etalons update
tongsonbarbs 2315bb9
add search Icon from FilterCell class
tongsonbarbs edf78a4
add test update
tongsonbarbs 6b51190
suggested
tongsonbarbs 0c1b209
remove unnecessary
tongsonbarbs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file modified
BIN
+110 Bytes
(100%)
apps/demos/testing/etalons/DataGrid-DeferredSelection (material.blue.light).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+243 Bytes
(100%)
...ownbox/etalons/dropdownbox_multiple_selection_gridbox (material.blue.light).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions
56
e2e/testcafe-devextreme/tests/dataGrid/accessibility/contrast.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; | ||
import DataGrid from 'devextreme-testcafe-models/dataGrid'; | ||
import FilterTextBox from 'devextreme-testcafe-models/dataGrid/editors/filterTextBox'; | ||
import url from '../../../helpers/getPageUrl'; | ||
import { createWidget } from '../../../helpers/createWidget'; | ||
import { getData } from '../helpers/generateDataSourceData'; | ||
import { Themes } from '../../../helpers/themes'; | ||
import { changeTheme } from '../../../helpers/changeTheme'; | ||
|
||
fixture.disablePageReloads`DataGrid - contrast` | ||
.page(url(__dirname, '../../container.html')); | ||
|
||
// T1257970 | ||
[ | ||
Themes.genericLight, | ||
Themes.fluentBlue, | ||
Themes.materialBlue, | ||
].forEach((theme) => { | ||
test('DataGrid - Contrast between icons in the Filter Row menu and their background doesn\'t comply with WCAG accessibility standards', async (t) => { | ||
const dataGrid = new DataGrid('#container'); | ||
const filterEditor = dataGrid.getFilterEditor(0, FilterTextBox); | ||
const searchButton = filterEditor.menuButton; | ||
const filterMenu = filterEditor.menu; | ||
const { takeScreenshot, compareResults } = createScreenshotsComparer(t); | ||
|
||
await t | ||
.expect(dataGrid.isReady()) | ||
.ok(); | ||
await t | ||
.click(searchButton) | ||
.expect(filterMenu.element.exists) | ||
.ok(); | ||
await t | ||
.expect(await takeScreenshot(`T1257970-datagrid-menu-icon-contrast-${theme}.png`, dataGrid.element)) | ||
.ok() | ||
.expect(compareResults.isValid()) | ||
.ok(compareResults.errorMessages()); | ||
}).before( | ||
async () => { | ||
await changeTheme(theme); | ||
await createWidget('dxDataGrid', { | ||
dataSource: getData(5, 5), | ||
filterRow: { | ||
visible: true, | ||
}, | ||
}); | ||
}, | ||
).after( | ||
async () => { | ||
if (theme === Themes.genericLight) { | ||
return; | ||
} | ||
await changeTheme(Themes.genericLight); | ||
}, | ||
); | ||
}); |
Binary file added
BIN
+39.7 KB
...ccessibility/etalons/T1257970-datagrid-menu-icon-contrast-fluent.blue.light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33.7 KB
...id/accessibility/etalons/T1257970-datagrid-menu-icon-contrast-generic.light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+35.8 KB
...essibility/etalons/T1257970-datagrid-menu-icon-contrast-material.blue.light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+241 Bytes
(100%)
...Grid/stickyColumns/etalons/filter_row_with_sticky_columns_1_(generic.light).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+275 Bytes
(100%)
...tickyColumns/etalons/filter_row_with_sticky_columns_1_(material.blue.light).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+714 Bytes
(100%)
...tickyColumns/etalons/filter_row_with_sticky_columns_2_(material.blue.light).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ import FocusableElement from '../../internal/focusable'; | |
|
||
const CLASS = { | ||
filterMenu: 'dx-filter-menu', | ||
filterMenuItem: 'dx-menu-item', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You do not need changes in the testcafe model |
||
editorInput: 'dx-texteditor-input', | ||
filterEditor: 'dx-editor-with-menu', | ||
focused: 'dx-focused', | ||
|
@@ -16,7 +17,7 @@ export default class FilterCell extends FocusableElement { | |
} | ||
|
||
getSearchIcon(): FocusableElement { | ||
return new FocusableElement(this.element.find(`.${CLASS.filterMenu}`)); | ||
return new FocusableElement(this.element.find(`.${CLASS.filterMenuItem}`)); | ||
} | ||
|
||
getEditorInput(): FocusableElement { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We should not delete Theme Builder variables as them already became a part of public API. Project where these variables are used will be broken.