Enable excessibility checking of login menu, and remove unnecessary exclusion from header

This commit is contained in:
Tim Donohue
2023-08-29 11:43:36 -05:00
parent 158ebb0e32
commit 339ed63734
2 changed files with 13 additions and 2 deletions

View File

@@ -11,8 +11,7 @@ describe('Header', () => {
testA11y({ testA11y({
include: ['ds-header'], include: ['ds-header'],
exclude: [ exclude: [
['#search-navbar-container'], // search in navbar has duplicative ID. Will be fixed in #1174 ['#search-navbar-container'] // search in navbar has duplicative ID. Will be fixed in #1174
['.dropdownLogin'] // "Log in" link has color contrast issues. Will be fixed in #1149
], ],
}); });
}); });

View File

@@ -1,4 +1,5 @@
import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER, TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e'; import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER, TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';
const page = { const page = {
openLoginMenu() { openLoginMenu() {
@@ -123,4 +124,15 @@ describe('Login Modal', () => {
cy.location('pathname').should('eq', '/forgot'); cy.location('pathname').should('eq', '/forgot');
cy.get('ds-forgot-email').should('exist'); cy.get('ds-forgot-email').should('exist');
}); });
it('should pass accessibility tests', () => {
cy.visit('/');
page.openLoginMenu();
cy.get('ds-log-in').should('exist');
// Analyze <ds-log-in> for accessibility issues
testA11y('ds-log-in');
});
}); });