Skip to content

Commit e2d0f85

Browse files
authored
CaptionDisplaySettings Explainer (#125)
Adds an explainer for a proposed web API addition which would expose the ability for a web app to pop up a system-provided caption display settings menu.
1 parent 450a338 commit e2d0f85

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

CaptionDisplaySettings/README.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Subtitle Style Menu Explainer
2+
3+
The purpose of this document is to explain a new web API intended to allow websites to comply with new [FCC accessibility regulations](https://www.fcc.gov/document/fcc-acts-improve-accessibility-closed-captioning-settings), specifically in regards to making caption display settings "readily accessible".
4+
5+
## Authors
6+
7+
* [Jer Noble](https://github.com/jernoble)
8+
* [Dana Estra](https://github.com/danae404)
9+
10+
## Background
11+
12+
The FCC has [previously](https://www.federalregister.gov/documents/2016/02/04/2016-00929/accessibility-of-user-interfaces-and-video-programming-guides-and-menus) required devices and applications to support closed captioning, and those devices and applications must also support user-specificed styling of caption display. The new [regulations](https://www.fcc.gov/document/fcc-acts-improve-accessibility-closed-captioning-settings) build upon those requirements and adds requirements and five factors to evaluate compliance with those requrements: "proximity, discoverability, previewability,
13+
consistency and persistence" [^§I.2]. The order requires manufacturers of covered devices to "expose closed caption display
14+
settings via an application programming interface (API) that an over-the-top app provider can use upon
15+
launch of their app on the device" [^§III.B.1.28].
16+
17+
This explainer proposes a new Web API which fulfills the requirements in this regulation, by allowing a web app to trigger a platform-provided subtitle settings menu. The subtitle settings menu will meet the "previewability, consistency, and persistence" factors from the regulations above, without comprimising users' privacy. The remaining factors of "proximity and discoverability" will be the responsibility of the web app itself.
18+
19+
## Use Cases
20+
21+
The primary use case is to enable a web application which is covered by the regulation in question, uses the browser to render subtitles, to access the platform subtitle settings submenu. The web app may have custom playback controls, including custom controls to choose between available subtitle or closed caption options. To meet the "proximity and discoverability" requirements, the web app can add a "Settings..." menu item in their caption selection menu that, when selected, will call into this new web API.
22+
23+
## Concepts
24+
25+
The following concepts are used in the FCC regulation:
26+
27+
"Proximity"
28+
* The FCC regulation requires [^§III.B.1.24] that apps “will place ... the closed caption display settings ... in one area of the
29+
settings ... that is accessed via a means reasonably comparable to a button, key, or icon.”
30+
* Web apps may choose to meet this requirement by adding a button or menu item to their custom playback controls which calls into this new Web API
31+
32+
"Discoverability"
33+
* The FCC regulation requires [^§III.B.1.26] usability testing to be performed in order to ensure the caption display settings are discoverable.
34+
35+
"Previewability"
36+
* The FCC regulation requires [^§III.B.1.27] that users "are able to preview the appearance of closed captions on
37+
programming on their screen while changing the closed captioning display settings".
38+
* The responsibility for meeting this factor falls upon the UA, which will show placeholder captions while the caption display settings menu is visible, and will adjust the styling of that placeholder as the user chooses settings.
39+
40+
"Consistency and Persistence"
41+
* The FCC regulation requires [^§III.B.1.28] that devices provide access to caption display settings via an API accessible to applications, and that covered distributors will use "the operating system-level closed caption settings of the [apparatus] upon launch of the app on the device".
42+
* The proposed web API is intended to be the mechanism by which both devices will provide access to caption display settings.
43+
* Support for distributors applying "operating system-level closed caption settings" is out of scope of this proposal, however the web platform already includes support for applying those settings via TextTracks, when UAs which apply OS settings to TextTrack rendering.
44+
45+
## Usage
46+
47+
### HTMLMediaElement.showCaptionSettings()
48+
49+
```idl
50+
dictionary CaptionDisplaySettingsOptions {
51+
attribute Node? anchorNode;
52+
attribute CSSOMString? positionArea;
53+
};
54+
55+
partial interface HTMLMediaElement {
56+
Promise<undefined> showCaptionDisplaySettings(optional CaptionDisplaySettingsOptions options);
57+
};
58+
```
59+
60+
### Present menu
61+
62+
`showCaptionSettings()`, when called, will place a caption display settings menu on the screen. If applicable, it will position the menu in such a way that it is adjacent to the `options.anchorNode` provided, at the area indicated by `options.positionArea`, which are both defined in [CSS Anchor Position](https://drafts.csswg.org/css-anchor-position/). The returned promise will resolve once the user has made an affirmative caption display settings choice, or has otherwise closed the display settings menu.
63+
64+
The menu must provide the following behaviors:
65+
- The menu will provide a list of selectable "styles", matching the list provided by the operating system.
66+
- The currently selected menu item will match the operating system's currently selected "style".
67+
- Any active cues from any `TextTrack`s will have their rendering surpressed.
68+
- A synthenic "cue" will be provided as if it were an active cue from a displaying `TextTrack`.
69+
- Selecting a "style" will update the rendering of the synthetic cue, allowing that style to be "previewed".
70+
- Once the user has made an affirmative style selection choice, the menu will close, and the returned `Promise` will resolve.
71+
72+
Example:
73+
74+
```js
75+
this.subtitleSettingsMenu.addEventListener('click', async event => {
76+
let options = {
77+
anchorNode: this.subtitleSettingsMenu,
78+
positionArea: "center right",
79+
};
80+
await this.video.showCaptionSettings(options);
81+
this.hideSubtitleMenu();
82+
});
83+
```
84+
85+
### Menu dismissal
86+
87+
The resulting UI will be provided by the system, and will follow system conventions for dismissal. No explicit API to dismiss a previously presented menu will be provided.
88+
89+
### User Activation
90+
91+
A naive implementation of a context menu can both be modal and can steal focus. Therefore, this API will require a non-consuming user activation.
92+
93+
## Alternative Considered Usage
94+
95+
One alternative briefly considered was to expose the users' list of preferred caption styles, their attributes, and all settings directly to web apps through a expansive set of APIs. However, this would dramatically increase the ability of sites to [passively fingerprint](https://www.w3.org/TR/fingerprinting-guidance/#passive) users, and was dismissed as an unacceptable privacy risk.
96+
97+
## References
98+
99+
[^§I.2]: [FCC 24-79, §I.2] https://docs.fcc.gov/public/attachments/FCC-24-79A1.pdf
100+
[^§III.B.1.28]: [FCC 24-79, §III.B.1.28] https://docs.fcc.gov/public/attachments/FCC-24-79A1.pdf
101+
[^§III.B.1.24]: [FCC 24-79, §III.B.1.24] https://docs.fcc.gov/public/attachments/FCC-24-79A1.pdf
102+
[^§III.B.1.26]: [FCC 24-79, §III.B.1.26] https://docs.fcc.gov/public/attachments/FCC-24-79A1.pdf
103+
[^§III.B.1.27]: [FCC 24-79, §III.B.1.27] https://docs.fcc.gov/public/attachments/FCC-24-79A1.pdf

0 commit comments

Comments
 (0)