From ab1c358d6aea42944486b9349deb1dd01f246b5d Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Fri, 25 Jun 2021 17:26:40 +0100 Subject: [PATCH 01/14] replacing non-streaming audio with live audio - initial commit --- _rules/audio-as-media-alternative-afb423.md | 2 +- _rules/audio-is-live-213x3x.md | 91 +++++++++++++++++++++ _rules/audio-text-alternative-e7aa44.md | 4 +- _rules/audio-transcript-2eb176.md | 2 +- 4 files changed, 96 insertions(+), 3 deletions(-) create mode 100755 _rules/audio-is-live-213x3x.md diff --git a/_rules/audio-as-media-alternative-afb423.md b/_rules/audio-as-media-alternative-afb423.md index 71747c7b35a..5806aa26e85 100755 --- a/_rules/audio-as-media-alternative-afb423.md +++ b/_rules/audio-as-media-alternative-afb423.md @@ -18,7 +18,7 @@ acknowledgments: ## Applicability -This rule applies to every [non-streaming](#non-streaming-media-element) `audio` element that is: +This rule applies to every `audio` element that is: - playing; or, - has a "play button" that is [visible][] and [included in the accessibility tree][]. diff --git a/_rules/audio-is-live-213x3x.md b/_rules/audio-is-live-213x3x.md new file mode 100755 index 00000000000..857e42b4f44 --- /dev/null +++ b/_rules/audio-is-live-213x3x.md @@ -0,0 +1,91 @@ +--- +id: 213x3x +name: '`audio` element plays live content' +rule_type: atomic +description: | + This rule checks the content played by an `audio` element is live +accessibility_requirements: +input_aspects: + - DOM Tree + - CSS Styling + - Audio output +acknowledgments: + authors: + - Carlos Duarte +--- + +## Applicability + +This rule applies to every `audio` element that is: + +- playing; or, +- has a "play button" that is [visible][] and [included in the accessibility tree][]. + +**Note:** A play button is an interactive element that when activated, plays the audio. + +## Expectation + +The target element's [media resource](https://html.spec.whatwg.org/multipage/media.html#media-resource) is being broadcasted in real time without being first recorded and stored on the origin server. + +## Assumptions + +_No assumptions._ + +## Accessibility Support + +There are no major accessibility support issues known for this rule. + +## Background + +- [Understanding SC 1.2.1:Audio-only and Video-only (Prerecorded)](https://www.w3.org/WAI/WCAG21/Understanding/audio-only-and-video-only-prerecorded) + +## Test Cases + +### Passed + +#### Passed Example 1 + +This `audio` element plays a live media resource. + +```html + + + +``` + +### Failed + +#### Failed Example 1 + +This `audio` element plays a recorded media resource. + +```html + + + +``` + +### Inapplicable + +#### Inapplicable Example 1 + +This `audio` element's controls are not [visible][] on the page. + +```html + + + +``` + +#### Inapplicable Example 2 + +This `audio` element does not have controls. + +```html + + + +``` + +[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of included in the accessibility tree' +[visible]: #visible 'Definition of visible' diff --git a/_rules/audio-text-alternative-e7aa44.md b/_rules/audio-text-alternative-e7aa44.md index 892df616d84..91d28c1ab2d 100755 --- a/_rules/audio-text-alternative-e7aa44.md +++ b/_rules/audio-text-alternative-e7aa44.md @@ -18,6 +18,7 @@ accessibility_requirements: input_rules: - 2eb176 - afb423 + - 213x3x acknowledgments: authors: - Brian Bors @@ -28,7 +29,7 @@ acknowledgments: ## Applicability -This rule applies to any [non-streaming](#non-streaming-media-element) `audio` element that is: +This rule applies to any `audio` element that is: - playing; or, - has a "play button" that is [visible][] and [included in the accessibility tree](#included-in-the-accessibility-tree). @@ -41,6 +42,7 @@ For each test target, the [outcome](#outcome) of at least one of the following r - [`Audio` Element Content Has Transcript](https://act-rules.github.io/rules/2eb176) - [`Audio` Element Content Is Media Alternative For Text](https://act-rules.github.io/rules/afb423) +- [`Audio` Element Plays Live Content](https://act-rules.github.io/rules/213x3x) ## Assumptions diff --git a/_rules/audio-transcript-2eb176.md b/_rules/audio-transcript-2eb176.md index ace45fdf733..56540ae80c9 100755 --- a/_rules/audio-transcript-2eb176.md +++ b/_rules/audio-transcript-2eb176.md @@ -18,7 +18,7 @@ acknowledgments: ## Applicability -This rule applies to every [non-streaming](#non-streaming-media-element) `audio` element that is: +This rule applies to every `audio` element that is: - playing; or, - has a "play button" that is [visible][] and [included in the accessibility tree][]. From ee235afcb644a682bbebafc9bc22ad726cfe43a1 Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Fri, 25 Jun 2021 17:40:52 +0100 Subject: [PATCH 02/14] Update spelling-ignore.yml --- __tests__/spelling-ignore.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/__tests__/spelling-ignore.yml b/__tests__/spelling-ignore.yml index ac2108c5192..00513da29e7 100755 --- a/__tests__/spelling-ignore.yml +++ b/__tests__/spelling-ignore.yml @@ -219,6 +219,7 @@ - unicity - Menuitem - menuitems +- broadcasted # Parts of Unicode - 000A From 7d3d563950cf5b49d10fcaedc91f0a95c792079b Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Fri, 16 Jul 2021 20:27:12 +0100 Subject: [PATCH 03/14] Create play-button.md --- pages/glossary/play-button.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 pages/glossary/play-button.md diff --git a/pages/glossary/play-button.md b/pages/glossary/play-button.md new file mode 100755 index 00000000000..298567d3c51 --- /dev/null +++ b/pages/glossary/play-button.md @@ -0,0 +1,12 @@ +--- +title: Play button +key: play-button +unambiguous: true +objective: false +--- + +A play button is an [instrument][] that when [activated][] plays a [media resource][]. + +[activated]: https://html.spec.whatwg.org/#activation +[instrument]: #instrument-to-achieve-an-objective +[media resource]: https://html.spec.whatwg.org/multipage/media.html#media-resource \ No newline at end of file From 247d60772819cfbac39dbc1953f8df5130d34198 Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Fri, 16 Jul 2021 20:27:27 +0100 Subject: [PATCH 04/14] update expectation --- _rules/audio-is-live-213x3x.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/_rules/audio-is-live-213x3x.md b/_rules/audio-is-live-213x3x.md index 857e42b4f44..af7540096e6 100755 --- a/_rules/audio-is-live-213x3x.md +++ b/_rules/audio-is-live-213x3x.md @@ -19,13 +19,13 @@ acknowledgments: This rule applies to every `audio` element that is: - playing; or, -- has a "play button" that is [visible][] and [included in the accessibility tree][]. - -**Note:** A play button is an interactive element that when activated, plays the audio. +- has a [play button][] that is [visible][] and [included in the accessibility tree][]. ## Expectation -The target element's [media resource](https://html.spec.whatwg.org/multipage/media.html#media-resource) is being broadcasted in real time without being first recorded and stored on the origin server. +For each test target one of the following is true: +- it is not possible to [seek][] the end of the target element's [media resource][]; or +- after [seeking][seek] the end of the target element's [media resource][] the [current playback position][] is not the end of the target element's [media resource][]. ## Assumptions @@ -45,6 +45,8 @@ There are no major accessibility support issues known for this rule. #### Passed Example 1 +Still looking for a solution to the problem of finding a live stream that we can use. + This `audio` element plays a live media resource. ```html @@ -87,5 +89,9 @@ This `audio` element does not have controls. ``` +[current playback position]: https://html.spec.whatwg.org/multipage/media.html#current-playback-position [included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of included in the accessibility tree' +[media resource]: https://html.spec.whatwg.org/multipage/media.html#media-resource +[play button]: #play-button +[seek]: https://html.spec.whatwg.org/multipage/media.html#dom-media-seek [visible]: #visible 'Definition of visible' From 747fce7031470249c01337df3ef218725c86cdae Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Fri, 16 Jul 2021 20:50:42 +0100 Subject: [PATCH 05/14] comments about the passed example --- _rules/audio-is-live-213x3x.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_rules/audio-is-live-213x3x.md b/_rules/audio-is-live-213x3x.md index af7540096e6..e1dd39b4dab 100755 --- a/_rules/audio-is-live-213x3x.md +++ b/_rules/audio-is-live-213x3x.md @@ -47,6 +47,8 @@ There are no major accessibility support issues known for this rule. Still looking for a solution to the problem of finding a live stream that we can use. +The Media Working Group has a solution that could we might use, but requires a camera connected to the device where the rule is being tested. If we can't find anything else, we might add a note to the example stating this requirement. The example (does not work on Safari, works in Chrome) can be found here: https://github.com/w3c/webcodecs/tree/main/samples/webcam-in-worker + This `audio` element plays a live media resource. ```html From 029a4a65865fcdaf104bea280933f8c7e84436c9 Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Mon, 6 Sep 2021 19:54:17 +0100 Subject: [PATCH 06/14] Add passed example with live audio from microphone on device --- _rules/audio-is-live-213x3x.md | 38 ++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/_rules/audio-is-live-213x3x.md b/_rules/audio-is-live-213x3x.md index e1dd39b4dab..0dfb0180aec 100755 --- a/_rules/audio-is-live-213x3x.md +++ b/_rules/audio-is-live-213x3x.md @@ -45,16 +45,42 @@ There are no major accessibility support issues known for this rule. #### Passed Example 1 -Still looking for a solution to the problem of finding a live stream that we can use. +This `audio` element plays a live media resource by streaming the audio from the device's microphone. -The Media Working Group has a solution that could we might use, but requires a camera connected to the device where the rule is being tested. If we can't find anything else, we might add a note to the example stating this requirement. The example (does not work on Safari, works in Chrome) can be found here: https://github.com/w3c/webcodecs/tree/main/samples/webcam-in-worker - -This `audio` element plays a live media resource. +This example requires a browser supporting the experimental MediaStreamTrack API. The browser must be authorized to access a microphone. You can successfully test this example on Google Chrome with the flag --enable-blink-features=WebCodecs,MediaStreamInsertableStreams ```html - - + +

+ + + ``` ### Failed From 712fc60007269470f1496c237cc08d3dde89f3d1 Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Mon, 6 Sep 2021 19:54:58 +0100 Subject: [PATCH 07/14] Update expectation Addresses https://github.com/act-rules/act-rules.github.io/pull/1661/files#r674724648 --- _rules/audio-is-live-213x3x.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/_rules/audio-is-live-213x3x.md b/_rules/audio-is-live-213x3x.md index 0dfb0180aec..e9b8f765710 100755 --- a/_rules/audio-is-live-213x3x.md +++ b/_rules/audio-is-live-213x3x.md @@ -23,9 +23,7 @@ This rule applies to every `audio` element that is: ## Expectation -For each test target one of the following is true: -- it is not possible to [seek][] the end of the target element's [media resource][]; or -- after [seeking][seek] the end of the target element's [media resource][] the [current playback position][] is not the end of the target element's [media resource][]. +For each test target, after [seeking][seek] the end of the target element's [media resource][] the [current playback position][] is not the end of the target element's [media resource][]. ## Assumptions From 04f15fa6fe33cc774a433c02e5444c125bf903fe Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Wed, 26 Jan 2022 19:15:13 +0000 Subject: [PATCH 08/14] update description and content of PE1 to include instructions --- _rules/audio-is-live-213x3x.md | 77 ++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/_rules/audio-is-live-213x3x.md b/_rules/audio-is-live-213x3x.md index e9b8f765710..b44ffc02b95 100755 --- a/_rules/audio-is-live-213x3x.md +++ b/_rules/audio-is-live-213x3x.md @@ -21,7 +21,7 @@ This rule applies to every `audio` element that is: - playing; or, - has a [play button][] that is [visible][] and [included in the accessibility tree][]. -## Expectation +## Expectation For each test target, after [seeking][seek] the end of the target element's [media resource][] the [current playback position][] is not the end of the target element's [media resource][]. @@ -45,40 +45,53 @@ There are no major accessibility support issues known for this rule. This `audio` element plays a live media resource by streaming the audio from the device's microphone. -This example requires a browser supporting the experimental MediaStreamTrack API. The browser must be authorized to access a microphone. You can successfully test this example on Google Chrome with the flag --enable-blink-features=WebCodecs,MediaStreamInsertableStreams +Test instructions: + +- Load the test case in a browser supporting the experimental MediaStreamTrack API (You can successfully test this example on Google Chrome with the flag --enable-blink-features=WebCodecs,MediaStreamInsertableStreams); +- Authorize the browser to access a microphone. ```html - -

- - - +

+ This example requires a browser supporting the experimental MediaStreamTrack API. The browser must be authorized to + access a microphone. You can successfully test this example on Google Chrome with the flag + --enable-blink-features=WebCodecs,MediaStreamInsertableStreams +

+ +

+ + + + ``` ### Failed From b8421b804d2b286e27b10955d8a67620e1d864b9 Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Wed, 26 Jan 2022 19:25:32 +0000 Subject: [PATCH 09/14] Update spelling-ignore.yml --- __tests__/spelling-ignore.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/__tests__/spelling-ignore.yml b/__tests__/spelling-ignore.yml index 20a0aa18a10..0dd61ecf4eb 100755 --- a/__tests__/spelling-ignore.yml +++ b/__tests__/spelling-ignore.yml @@ -83,6 +83,9 @@ - iso # lowercase needed in reference list - RFC - rfc +- MediaStreamTrack +- enable-blink-features=WebCodecs +- MediaStreamInsertableStreams # spell checker checks against strict casing & hence some repeated words here - Autocomplete From 2d300b58d2aef871f517731f843cc7943722942b Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Wed, 26 Jan 2022 19:48:44 +0000 Subject: [PATCH 10/14] update expectation and PE1 to handle MediaStream not being seekable --- _rules/audio-is-live-213x3x.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/_rules/audio-is-live-213x3x.md b/_rules/audio-is-live-213x3x.md index b44ffc02b95..e2af83e6abc 100755 --- a/_rules/audio-is-live-213x3x.md +++ b/_rules/audio-is-live-213x3x.md @@ -23,7 +23,10 @@ This rule applies to every `audio` element that is: ## Expectation -For each test target, after [seeking][seek] the end of the target element's [media resource][] the [current playback position][] is not the end of the target element's [media resource][]. +For each test target at least one of the following is true: + +- the target element's [media resource][] is not [seekable][]; or +- after [seeking][seek] the end of the target element's [media resource][] the [current playback position][] is not the end of the target element's [media resource][]. ## Assumptions @@ -43,7 +46,7 @@ There are no major accessibility support issues known for this rule. #### Passed Example 1 -This `audio` element plays a live media resource by streaming the audio from the device's microphone. +This `audio` element plays a live media resource by streaming the audio from the device's microphone. The [media resource][] is a MediaStream which is not [seekable][]. Test instructions: @@ -133,4 +136,5 @@ This `audio` element does not have controls. [media resource]: https://html.spec.whatwg.org/multipage/media.html#media-resource [play button]: #play-button [seek]: https://html.spec.whatwg.org/multipage/media.html#dom-media-seek +[seekable]: https://html.spec.whatwg.org/multipage/media.html#dom-media-seekable [visible]: #visible 'Definition of visible' From cee32c06189a80a98c691f7255880e7820eaacea Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Wed, 26 Jan 2022 19:54:53 +0000 Subject: [PATCH 11/14] Update spelling-ignore.yml --- __tests__/spelling-ignore.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/__tests__/spelling-ignore.yml b/__tests__/spelling-ignore.yml index 0dd61ecf4eb..b49936cc349 100755 --- a/__tests__/spelling-ignore.yml +++ b/__tests__/spelling-ignore.yml @@ -83,6 +83,7 @@ - iso # lowercase needed in reference list - RFC - rfc +- MediaStream - MediaStreamTrack - enable-blink-features=WebCodecs - MediaStreamInsertableStreams @@ -228,6 +229,7 @@ - Namespaced - namespaceURI - testability +- seekable # Parts of Unicode - 000A From bf2385298dc8e05d9715e79fe4423bc75ea1b714 Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Fri, 15 Sep 2023 14:43:19 +0200 Subject: [PATCH 12/14] Update spelling-ignore.yml From 42031c6397e71333006d3463038d3c4f73eaabe5 Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Fri, 15 Sep 2023 14:53:18 +0200 Subject: [PATCH 13/14] Fix conflicts --- pages/glossary/play-button.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/glossary/play-button.md b/pages/glossary/play-button.md index 298567d3c51..262fbb1b805 100755 --- a/pages/glossary/play-button.md +++ b/pages/glossary/play-button.md @@ -9,4 +9,4 @@ A play button is an [instrument][] that when [activated][] plays a [media resour [activated]: https://html.spec.whatwg.org/#activation [instrument]: #instrument-to-achieve-an-objective -[media resource]: https://html.spec.whatwg.org/multipage/media.html#media-resource \ No newline at end of file +[media resource]: https://html.spec.whatwg.org/multipage/media.html#media-resource From 7865622f77f9379dd7c4164c005a9c81a6e8cedb Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Fri, 15 Sep 2023 15:01:44 +0200 Subject: [PATCH 14/14] Update audio-text-alternative-e7aa44.md