MM-53813: Fix(accessibility): on channels page (#24122)
* fix(accessibility): on channels page * fix lint and update dynamic-virtualized-list * fix snapshot and update per feedback * fix e2e tests * fix test --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a47af39d80
Коммит
93a2c3281a
@@ -19,8 +19,9 @@ type ExtendedFixtures = {
|
||||
};
|
||||
|
||||
export const test = base.extend<ExtendedFixtures>({
|
||||
axe: async ({page}, use) => {
|
||||
const ab = new AxeBuilderExtended(page);
|
||||
// eslint-disable-next-line no-empty-pattern
|
||||
axe: async ({}, use) => {
|
||||
const ab = new AxeBuilderExtended();
|
||||
await use(ab);
|
||||
},
|
||||
pw: async ({browser, viewport}, use) => {
|
||||
@@ -93,24 +94,15 @@ class PlaywrightExtended {
|
||||
}
|
||||
|
||||
class AxeBuilderExtended {
|
||||
/**
|
||||
* Each page should have its own Axe Builder to specifically list known issues
|
||||
* which are to be excluded from being scanned until issues are fixed.
|
||||
* Excluded element should have a corresponding ticket.
|
||||
*/
|
||||
|
||||
// '<site_url>/login'
|
||||
readonly loginPage: () => AxeBuilder;
|
||||
readonly builder: (page: Page, disableRules?: string[]) => AxeBuilder;
|
||||
|
||||
// See https://github.com/dequelabs/axe-core/blob/master/doc/API.md#axe-core-tags
|
||||
readonly tags: string[] = ['wcag2a', 'wcag2aa'];
|
||||
|
||||
// See https://github.com/dequelabs/axe-core/blob/master/doc/rule-descriptions.md#wcag-20-level-a--aa-rules
|
||||
readonly disabledRules: string[] = [];
|
||||
|
||||
constructor(page: Page) {
|
||||
this.loginPage = () => {
|
||||
return new AxeBuilder({page}).withTags(this.tags).disableRules(this.disabledRules);
|
||||
constructor() {
|
||||
// See https://github.com/dequelabs/axe-core/blob/master/doc/rule-descriptions.md#wcag-20-level-a--aa-rules
|
||||
this.builder = (page: Page, disableRules?: string[]) => {
|
||||
return new AxeBuilder({page}).withTags(this.tags).disableRules(disableRules || []);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user