Skip to content

Commit

Permalink
fixing some accessibility errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Claire.Nicholas authored and Claire.Nicholas committed Oct 6, 2023
1 parent bd5d3dc commit fa10d29
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 41 deletions.
28 changes: 14 additions & 14 deletions cypress/integration/a11y.lighttheme.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
*/

const A11Y_OPTS = {
runOnly: {
type: 'tag',
values: ['section508', 'best-practice', 'wcag21aa', 'wcag2aa'],
},
// runOnly: {
// type: 'tag',
// values: ['section508', 'best-practice', 'wcag21aa', 'wcag2aa'],
// },
};

context('Accessibility (a11y)', () => {
context('Logged out', () => {
it.skip('overview', () => {
cy.clearSession();
context('Logged out', () => {
it('overview', () => {
//cy.clearSession();
cy.setTheme('theme-light');
cy.visit('/account/login');
cy.injectAxe();
Expand All @@ -24,7 +24,7 @@ context('Accessibility (a11y)', () => {

context('Logged in', () => {
beforeEach(() => {
cy.clearSession();
//cy.clearSession();
cy.setTheme('theme-light');
cy.server();
// overview page
Expand Down Expand Up @@ -64,31 +64,31 @@ context('Accessibility (a11y)', () => {
cy.server({ enable: false });
});

it.skip('overview', () => {
it('overview', () => {
cy.checkA11yForPage('/', A11Y_OPTS);
});

it.skip('source repos', () => {
it('source repos', () => {
cy.checkA11yForPage('/account/source-repos', A11Y_OPTS);
});

it.skip('settings', () => {
it('settings', () => {
cy.checkA11yForPage('/github/octocat/settings', A11Y_OPTS);
});

it.skip('repo page', () => {
it('repo page', () => {
cy.checkA11yForPage('/github/octocat', A11Y_OPTS);
});

it.skip('hooks page', () => {
it('hooks page', () => {
cy.login('/github/octocat/hooks');
cy.injectAxe();
cy.wait(500);
cy.get('[data-test=hook]').click({ multiple: true });
cy.checkA11y(A11Y_OPTS);
});

it.skip('build page', () => {
it('build page', () => {
cy.login('/github/octocat/1');
cy.injectAxe();
cy.wait(500);
Expand Down
26 changes: 13 additions & 13 deletions cypress/integration/a11y.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
*/

const A11Y_OPTS = {
runOnly: {
type: 'tag',
values: ['section508', 'best-practice', 'wcag21aa', 'wcag2aa'],
},
// runOnly: {
// type: 'tag',
// values: ['section508', 'best-practice', 'wcag21aa', 'wcag2aa'],
// },
};

context('Accessibility (a11y)', () => {
context('Logged out', () => {
it.skip('overview', () => {
cy.clearSession();
cy.visit('/account/login');
cy.injectAxe();
cy.wait(500);
cy.checkA11y(A11Y_OPTS);
});
});
// context('Logged out', () => {
// it.skip('overview', () => {
// cy.clearSession();
// cy.visit('/account/login');
// cy.injectAxe();
// cy.wait(500);
// cy.checkA11y(A11Y_OPTS);
// });
// });

context('Logged in', () => {
beforeEach(() => {
Expand Down
16 changes: 8 additions & 8 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

// Fail on first error if not running in CI
// (until Cypress has built-in way to deal with this)
if (!Cypress.env('CI')) {
afterEach(function onAfterEach() {
// Skips all subsequent tests in a spec, and flags the whole run as failed
if (this.currentTest.state === 'failed') {
Cypress.runner.stop();
}
});
}
// if (!Cypress.env('CI')) {
// afterEach(function onAfterEach() {
// // Skips all subsequent tests in a spec, and flags the whole run as failed
// if (this.currentTest.state === 'failed') {
// Cypress.runner.stop();
// }
// });
// }

// Login helper (accepts initial path to visit)
Cypress.Commands.add('login', (path = '/') => {
Expand Down
1 change: 0 additions & 1 deletion src/elm/Help/View.elm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ help args =
(class "details"
:: class "help"
:: class "-no-pad"
:: attribute "role" "button"
:: Util.open args.show
)
[ summary
Expand Down
4 changes: 2 additions & 2 deletions src/elm/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2989,7 +2989,7 @@ viewHeader session { feedbackLink, docsLink, theme, help, showId } =

identityAttributeList : List (Html.Attribute Msg)
identityAttributeList =
attribute "role" "navigation" :: Util.open showId
Util.open showId
in
header []
[ div [ class "identity", id "identity", Util.testAttribute "identity" ]
Expand All @@ -3013,7 +3013,7 @@ viewHeader session { feedbackLink, docsLink, theme, help, showId } =
details (identityBaseClassList :: identityAttributeList)
[ summary [ class "summary", Util.onClickPreventDefault (ShowHideIdentity Nothing), Util.testAttribute "identity-summary" ] [ text "Vela" ] ]
]
, nav [ class "help-links", attribute "role" "navigation" ]
, nav [ class "help-links" ]
[ ul []
[ li [] [ viewThemeToggle theme ]
, li [] [ a [ href feedbackLink, attribute "aria-label" "go to feedback" ] [ text "feedback" ] ]
Expand Down
6 changes: 3 additions & 3 deletions src/elm/Search.elm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ homeSearchBar filter search =
, onInput search
]
[]
, FeatherIcons.filter |> FeatherIcons.toHtml [ attribute "role" "img" ]
, FeatherIcons.filter |> FeatherIcons.toHtml [ attribute "aria-label" "filter" ]
]


Expand All @@ -75,7 +75,7 @@ repoSearchBarGlobal searchFilters search =
, id "global-search-input"
]
[]
, FeatherIcons.filter |> FeatherIcons.toHtml [ attribute "role" "img" ]
, FeatherIcons.filter |> FeatherIcons.toHtml [ attribute "aria-label" "filter" ]
]


Expand All @@ -94,7 +94,7 @@ repoSearchBarLocal searchFilters org search =
, onInput <| search org
]
[]
, FeatherIcons.filter |> FeatherIcons.toHtml [ attribute "role" "img" ]
, FeatherIcons.filter |> FeatherIcons.toHtml [ attribute "aria-label" "filter" ]
]


Expand Down

0 comments on commit fa10d29

Please sign in to comment.