-
Notifications
You must be signed in to change notification settings - Fork 776
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in audio-video-incomplete (pull request #122)
feat: change audio/video rule to report incomplete Closes #285 Approved-by: Wilco Fiers <wilco.fiers@deque.com>
- Loading branch information
Marcy Sutton
committed
Apr 20, 2017
1 parent
4682b1e
commit 30be884
Showing
11 changed files
with
42 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
return !(node.querySelector('track[kind=captions]')); | ||
var tracks = node.querySelectorAll('track'); | ||
if (tracks.length) { | ||
for (var i=0; i<tracks.length; i++) { | ||
var kind = tracks[i].getAttribute('kind'); | ||
if (kind && kind === 'captions') { | ||
// only return for matching track, in case there are multiple | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
// for multiple track elements, return the first one that matches | ||
return undefined; |
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 |
---|---|---|
@@ -1 +1,12 @@ | ||
return !(node.querySelector('track[kind=descriptions]')); | ||
var tracks = node.querySelectorAll('track'); | ||
if (tracks.length) { | ||
for (var i=0; i<tracks.length; i++) { | ||
var kind = tracks[i].getAttribute('kind'); | ||
if (kind && kind === 'descriptions') { | ||
// only return for matching track, in case there are multiple | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
return undefined; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"description": "audio-caption test", | ||
"rule": "audio-caption", | ||
"violations": [["#empty"]], | ||
"incomplete": [["#empty"]], | ||
"passes": [["#caption"]] | ||
} |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
<video id="fail1"></video> | ||
<video id="fail2"><track kind="descriptions"></video> | ||
<video id="incomplete1"></video> | ||
<video id="fail1"><track kind="descriptions"></video> | ||
<video id="pass1"><track kind="captions"></video> | ||
<video id="pass2"><track kind="descriptions"><track kind="captions"></video> |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"description": "video-caption test", | ||
"rule": "video-caption", | ||
"violations": [["#fail1"], ["#fail2"]], | ||
"incomplete": [["#incomplete1"]], | ||
"violations": [["#fail1"]], | ||
"passes": [["#pass1"], ["#pass2"]] | ||
} |
4 changes: 2 additions & 2 deletions
4
test/integration/rules/video-description/video-description.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
<video id="fail1"></video> | ||
<video id="fail2"><track kind="captions"></video> | ||
<video id="incomplete1"></video> | ||
<video id="fail1"><track kind="captions"></video> | ||
<video id="pass1"><track kind="descriptions"></video> | ||
<video id="pass2"><track kind="descriptions"><track kind="captions"></video> |
3 changes: 2 additions & 1 deletion
3
test/integration/rules/video-description/video-description.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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"description": "video-description test", | ||
"rule": "video-description", | ||
"violations": [["#fail1"], ["#fail2"]], | ||
"incomplete": [["#incomplete1"]], | ||
"violations": [["#fail1"]], | ||
"passes": [["#pass1"], ["#pass2"]] | ||
} |