Skip to content

Commit bd27846

Browse files
authored
chore(playwright): resolve axe violations with setContent (#28592)
Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> When using `.setContent`, the initial page template is lacking key metadata that will result in AXE violations. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Adds a default `lang` to the `html` document root - Adds a default `title` tag ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent 196a22e commit bd27846

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/utils/test/playwright/page/utils/set-content.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ export const setContent = async (page: Page, html: string, testInfo: TestInfo, o
3232

3333
const output = `
3434
<!DOCTYPE html>
35-
<html dir="${direction}">
35+
<html dir="${direction}" lang="en">
3636
<head>
37+
<title>Ionic Playwright Test</title>
3738
<meta charset="UTF-8" />
3839
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
3940
<link href="${baseUrl}/css/ionic.bundle.css" rel="stylesheet" />

0 commit comments

Comments
 (0)