Make a11y related lint rules more strict (#11372)

This commit is contained in:
Michael Telatynski 2023-08-07 08:57:12 +01:00 committed by GitHub
parent 5152aad059
commit 93b66501f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View file

@ -109,7 +109,6 @@ module.exports = {
"jsx-a11y/no-noninteractive-tabindex": "off", "jsx-a11y/no-noninteractive-tabindex": "off",
"jsx-a11y/no-static-element-interactions": "off", "jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/role-supports-aria-props": "off", "jsx-a11y/role-supports-aria-props": "off",
"jsx-a11y/tabindex-no-positive": "off",
"matrix-org/require-copyright-header": "error", "matrix-org/require-copyright-header": "error",
}, },

View file

@ -40,7 +40,14 @@ describe("Registration", () => {
cy.findByRole("button", { name: "Continue" }).should("be.visible"); cy.findByRole("button", { name: "Continue" }).should("be.visible");
// Only snapshot the server picker otherwise in the background `matrix.org` may or may not be available // Only snapshot the server picker otherwise in the background `matrix.org` may or may not be available
cy.get(".mx_Dialog").percySnapshotElement("Server Picker", { widths: [516] }); cy.get(".mx_Dialog").percySnapshotElement("Server Picker", { widths: [516] });
cy.checkA11y(); cy.checkA11y(undefined, {
rules: {
// Axe is unhappy with the configuration error's contrast here
"link-in-text-block": {
enabled: false,
},
},
});
cy.findByRole("textbox", { name: "Other homeserver" }).type(homeserver.baseUrl); cy.findByRole("textbox", { name: "Other homeserver" }).type(homeserver.baseUrl);
cy.findByRole("button", { name: "Continue" }).click(); cy.findByRole("button", { name: "Continue" }).click();

View file

@ -59,10 +59,6 @@ Cypress.Commands.overwrite(
"color-contrast": { "color-contrast": {
enabled: false, enabled: false,
}, },
// link-in-text-block also complains due to known contrast issues
"link-in-text-block": {
enabled: false,
},
...options.rules, ...options.rules,
}, },
}, },