Skip to content

Commit

Permalink
feat: add locale to result
Browse files Browse the repository at this point in the history
  • Loading branch information
forsti0506 committed May 21, 2021
1 parent 0edd3e1 commit c323310
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/a11y-sitechecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ async function checkSite(
height: vp.height,
});
await executeLogin(url, page, config);
const usedLocale = config.axeConfig?.locale ? config.axeConfig?.locale : (config.axeConfig?.localePath ? config.axeConfig?.localePath : 'en')

const result: A11ySitecheckerResult = {
testEngine: undefined,
Expand All @@ -64,6 +65,7 @@ async function checkSite(
passes: [],
analyzedUrls: [],
tabableImages: [],
usedLocale: usedLocale
};

const alreadyVisited: Map<string, SitecheckerViewport> = new Map<string, SitecheckerViewport>();
Expand Down
1 change: 1 addition & 0 deletions lib/models/a11y-sitechecker-result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface A11ySitecheckerResult {
violations: FullCheckerSingleResult[];
analyzedUrls: string[];
tabableImages: UrlWithTabableImages[];
usedLocale: string;
}

interface UrlWithTabableImages {
Expand Down

0 comments on commit c323310

Please sign in to comment.