-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix accessibility findings with app layout toolbar (#3063)
- Loading branch information
1 parent
a4ba868
commit f7a3810
Showing
9 changed files
with
58 additions
and
17 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import useBrowser from '@cloudscape-design/browser-test-tools/use-browser'; | ||
|
||
import { findAllPages } from '../__integ__/utils'; | ||
import { getUrlParams } from '../app-layout/__integ__/utils'; | ||
import A11yPageObject from './a11y-page-object'; | ||
|
||
const EXCLUDED_PAGES = [ | ||
// Test page for an app layout nested inside another through an iframe. | ||
// Not a use case that's encouraged. | ||
'app-layout/multi-layout-global-drawer-child-layout', | ||
]; | ||
|
||
describe('A11y checks for app layout toolbar', () => { | ||
findAllPages() | ||
.filter(page => page.startsWith('app-layout') && !EXCLUDED_PAGES.includes(page)) | ||
.forEach(inputUrl => { | ||
const url = `#/light/${inputUrl}?${getUrlParams('refresh-toolbar')}`; | ||
test( | ||
url, | ||
useBrowser(async browser => { | ||
const page = new A11yPageObject(browser); | ||
await browser.url(url); | ||
await page.waitForVisible('main'); | ||
await page.assertNoAxeViolations(); | ||
}) | ||
); | ||
}); | ||
}); |
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