w3c / wcag

Web Content Accessibility Guidelines
https://w3c.github.io/wcag/guidelines/22/
Other
1.09k stars 242 forks source link

Mechanism provided by the platform AND stopping 1.4.2: Audio Control #1533

Open jake-abma opened 3 years ago

jake-abma commented 3 years ago

1.4.2 Audio Control (Level A): If any audio on a Web page plays automatically for more than 3 seconds, either a mechanism is available to pause or stop the audio...

Intent is clear, also what is needed, BUT:

According to the wording/text and the definition of "mechanism" can I conclude that:

mechanism process or technique for achieving a result

NOTE The mechanism may be explicitly provided in the content, or may be relied upon to be provided by either the platform or by user agents, including assistive technologies.

A mechanism provided by the platform is a 'turn off audio' functionality (all devices have one) and so IF sound plays on a web application, you have the opportunity to turn it off, basically escaping this SC all along? (I can stop the sound)

ps. should this 'platform provision / ability' be ruled out and made clear in the Understanding doc?

patrickhlauke commented 3 years ago

A mechanism provided by the platform is a 'turn off audio' functionality (all devices have one) and so IF sound plays on a web application, you have the opportunity to turn it off, basically escaping this SC all along? (I can stop the sound)

maybe splitting hairs, but "pause or stop the audio" (on the particular page) is different from "pause or stop all audio" (for everything on the device/system) [ED: i originally had written "pause and stop all audio". unintentional, didn't mean to change to "or" to "and", as my point was not that, but the difference between "the" and "all"]. The intention is clearly the first one, reinforced by the "independently from the overall system volume level" part of the normative wording of the SC later on when talking of volume levels.

now, many browsers on desktop do offer things like audio controls for individual tabs, and some operating systems do give you access (though not very easily) to individual volume controls on a per application basis, but i don't think those are quite pervasive enough yet (and certainly not on mobile/tablet OSs)

mraccess77 commented 3 years ago

If a browser supports a mute tab feature then use of that browser likely would meet the criteria although we still tend to flag these issues as most situation users have varied browsers on mobile and PC platforms.

jake-abma commented 3 years ago

@patrickhlauke

maybe splitting hairs, but "pause or stop the audio" (on the particular page) is different from "pause and stop all audio" (for everything on the device/system). The intention is clearly the first one, reinforced by the "independently from the overall system volume level" part

But this is exactly where the question comes from, the intent was clear for me all along, not for people I have in training. 'stop the audio on the particular page' is just not what it says, and the 'reinforced' is not really 'reinforcing' as there is an 'OR'.

Your comment lacks the word 'OR' which plays a big part here, separating that part from the first.

patrickhlauke commented 3 years ago

Your comment lacks the word 'OR' which plays a big part here, separating that part from the first.

not quite sure what you mean. unless you're pointing out my slip-up putting "pause and stop all audio" when i should have written "pause or stop all audio". my point was the emphasis/difference between "the audio" and "all audio", and i slipped up in my haste to write this. corrected now.

jake-abma commented 3 years ago

No @patrickhlauke I meant the "or" in the SC text after the comma:

If any audio on a Web page plays automatically for more than 3 seconds, either a mechanism is available to pause or stop the audio, OR a mechanism is available to control audio volume independently from the overall system volume level.

(did not even see your 'or' ... :-) )

patrickhlauke commented 3 years ago

ah, gotcha. well, this smells like another long-standing miswording. i'm fairly sure the intent originally was not to say "it's ok, users just turn their sound off altogether, that counts as a mechanism, so all web content will pass anyway".

patrickhlauke commented 3 years ago

wonder if this needs a normative wording tweak then rather than an understanding patch...

If any audio on a Web page plays automatically for more than 3 seconds, either a mechanism is available to pause or stop the audio, or a mechanism is available to control audio volume for the web page's audio, independently from the overall system audio / volume level.

or more explicitly

If any audio on a Web page plays automatically for more than 3 seconds, either a mechanism is available to pause or stop the audio, or a mechanism is available to control audio volume for the web page's audio. This mechanism must be independent from the overall system audio/volume level.

bruce-usab commented 3 years ago

+1 for a normative wording tweak, since time has proved that the current phrasing is not clear enough. But if we revisit this, I think it should be formatted as list. Here's a version that tracks closely to how 1.4.7 is structured:

For any audio on a Web page that (1) plays automatically, and (2) last for more than 3 seconds, at least one of the following is true:

jake-abma commented 3 years ago

Can this be Surveyed?

For any audio on a Web page that (1) plays automatically, and (2) last for more than 3 seconds, at least one of the following is true:

Pause or Stop: The Web page provides a mechanism to pause or stop the audio. Volume Control: The Web page provides a mechanism to control audio volume independently from the overall system volume level.

patrickhlauke commented 3 years ago

https://github.com/w3c/wcag/pull/1824 [edit: actually, preference now from me on this https://github.com/w3c/wcag/pull/1825]

patrickhlauke commented 3 years ago

actually, having mulled this over some more, here's an alternative https://github.com/w3c/wcag/pull/1825 - i believe it is kosher to say that the mechanism itself can also be provided by the UA/platform. what was missing, which is the crux of @jake-abma's conundrum, was that the pause/stop didn't specify that this must be possible to do independently from any other audio output on the system (thus, just going by the wording, it could be interpreted as "if they mute the whole audio of the device, they pass". my preference is now strongly for this second PR I made.

mbgower commented 2 years ago

@patrickhlauke I think that works, but I think you could also easily put this rewording into a list form, as suggested by @bruce-usab

I'm supportive of either

patrickhlauke commented 2 years ago

@bruce-usab's rewording goes further than my suggestion in https://github.com/w3c/wcag/pull/1825 as it puts the emphasis back on the mechanism being provided by the "Web page", which is in direct contrast to what we're saying (that things like user agent controls to mute a tab are acceptable solutions if they're available consistently on all supported platforms). If we're keen on bullet points, the following may work:

If any audio on a Web page plays automatically for more than 3 seconds, at least one of the following is true:

  • a mechanism is available to pause or stop the audio
  • a mechanism is available to control the audio volume, independently from any other audio output of the user agent and the overall system.
mbgower commented 2 years ago

Yeah, I think that is working fairly well. I do find a bit of friction in the second bullet when I think of this from an 'audio as part of video' scenario. What exactly do we mean by "any other audio output" when we're thinking of the video player itself? Does a mute button on the video player fully address this?

Also, how does this requirement align with https://www.w3.org/WAI/WCAG21/Understanding/low-or-no-background-audio ?

I realize that the preamble condition is different (plays automatically vs contains background music, essentially), but when I combine them, it's a little hard to understand how to apply it if the background music begins automatically some time before the dialog. Would using the mute button, which turns off both the background music and the not yet begun dialogue fail "independently from any other audio output" fail?

patrickhlauke commented 2 years ago

I do find a bit of friction in the second bullet when I think of this from an 'audio as part of video' scenario. What exactly do we mean by "any other audio output" when we're thinking of the video player itself? Does a mute button on the video player fully address this?

do you mean a standalone video player application acting as the user agent? or video inside a web page inside a browser? for standalone video player, unless it can play multiple videos/audio sources simultaneously, a single mute button should be sufficient. if, for some bizarre reason, the video player itself made sounds (like some sound effect or bloop or whatever when you press a button in its interface), then this would mean that you can turn off/lower volume of the video+audio, but keep the bloop effects of the player itself...

Would using the mute button, which turns off both the background music and the not yet begun dialogue fail "independently from any other audio output" fail?

the audio here is a single stream/source, no? so a single mute/volume control is all that's needed. if it's some kind of special synchronised media player that calls in different streams of content to play simultaneously (and this fact is clear to the user, not just something that happens silently behind the scenes), then yes the user should have a mechanism to control the volume of each source/stream independently...some kind of audio mixing setup. but i think those would be outliers...

patrickhlauke commented 2 years ago

Updated https://github.com/w3c/wcag/pull/1825 to use the proposed bullet list format from https://github.com/w3c/wcag/issues/1533#issuecomment-1103114670

Closed the original https://github.com/w3c/wcag/pull/1824 to avoid confusion

mbgower commented 2 years ago

the audio here is a single stream/source, no? so a single mute/volume control is all that's needed.

Not for how Low or No background can be met, no. Second bullet

Turn Off The background sounds can be turned off.

patrickhlauke commented 2 years ago

well then the developer has to run the background and "foreground" audio as separate streams, and yeah in that case just having a single mute/volume control for all audio in the tab won't be sufficient. not surprising that a AAA SC requires more/stricter work than an A SC (as in, relying on a single mute/volume control would pass 1.4.2, but fail 1.4.7). but that should then be explained in the understanding for 1.4.7 Low or No Background Audio and not here.

patrickhlauke commented 2 years ago

it's possibly a distinction here in how multiple audio streams in the same web page are perceived by/exposed to the user. if behind the scenes audio is split into "one stream for background audio, one for foreground audio, but we run them simultaneously", then to the end user that's just a single "audio" event, and having a single pause or mute or volume control would, from a user's perspective, fulfill the requirement of the SC i'd say. (though for a user who needs the audio contrast of 1.4.7, that won't be enough).

alastc commented 2 years ago

From today we didn't get agreement on updating the SC text: https://www.w3.org/2022/08/16-ag-minutes.html#t10

However, I've updated #2621 with an understanding update to cover the same points.

fstrr commented 4 months ago

I can't work out what the status of this is, as there have been several apparent attempts on dealing with it. I think the issue is "does a browser's 'mute tab' functionality count as a mechanism to pause or stop the audio", and I think the answer is "no".

Adding it to the backlog project for discussion by the group.