-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(meta-viewport) Don't check zooming/scaling ability in iframe-embe…
…dded pages (#2951) * only check meta-viewport for disabled scaling on the main page, not within iframes * remove matches that doesn't do anything on a check * add integration tests * fix integration test to not use scrdoc and include axe
- Loading branch information
Showing
5 changed files
with
31 additions
and
0 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
12 changes: 12 additions & 0 deletions
12
test/integration/rules/meta-viewport/frames/iframe-with-zooming-disabled.html
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,12 @@ | ||
<html lang="en"> | ||
<head> | ||
<script src="/axe.js"></script> | ||
<meta name="viewport" content="maximum-scale=yes" /> | ||
<title>Test Page</title> | ||
</head> | ||
<body> | ||
<main> | ||
<h1>hello world</h1> | ||
</main> | ||
</body> | ||
</html> |
12 changes: 12 additions & 0 deletions
12
test/integration/rules/meta-viewport/meta-viewport-pass3.html
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,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta id="mvp" name="viewport" content="maximum-scale=2;" /> | ||
</head> | ||
|
||
<body> | ||
<div id="mocha"></div> | ||
<!-- iframe with zooming disabled should not fail the rule--> | ||
<iframe src="frames/iframe-with-zooming-disabled"></iframe> | ||
</body> | ||
</html> |
5 changes: 5 additions & 0 deletions
5
test/integration/rules/meta-viewport/meta-viewport-pass3.json
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,5 @@ | ||
{ | ||
"description": "meta-viewport passes when zooming is disabled on an iframe on the page", | ||
"rule": "meta-viewport", | ||
"passes": [["#mvp"]] | ||
} |