From ce54c610c2b71a0487911a06fb3d48de7b6044e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Daoust?= Date: Wed, 18 May 2022 22:51:41 +0200 Subject: [PATCH] Editorial: Address accessibility concerns (#309) This addresses some of the accessibility concerns raised in #307. Changes: - Provide two separate columns headers for enumeration description tables and add a caption - Make parameter names row headers in parameter definition tables - Pull back old custom styles for parameter definition tables that are no longer provided out of the box by ReSpec --- media-source-respec.html | 28 +++++++++--------- mse.css | 62 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 75 insertions(+), 15 deletions(-) diff --git a/media-source-respec.html b/media-source-respec.html index 782b970..d243045 100644 --- a/media-source-respec.html +++ b/media-source-respec.html @@ -287,7 +287,7 @@

MediaSource Object

"closed", "open", "ended" -}; +};
Enumeration description
@@ -304,7 +304,7 @@

MediaSource Object

enum EndOfStreamError {
     "network",
     "decode"
-};
Description of {{ReadyState}} enumeration values
ValueDescription
closed Indicates the source is not currently attached to a media element.
Enumeration description
network +};
Description of {{EndOfStreamError}} enumeration values
ValueDescription
network

Terminates playback and signals that a network error has occurred.

JavaScript applications SHOULD use this status code to terminate playback with a network error. For example, if a network error occurs while fetching media data.

decode @@ -414,7 +414,7 @@

Attributes

  • Add the new object to {{MediaSource/sourceBuffers}} and [=queue a task=] to [=fire an event=] named {{addsourcebuffer}} at {{MediaSource/sourceBuffers}}.
  • Return the new object.
  • -
    ParameterTypeNullableOptionalDescription
    |type|{{DOMString}}
    Return type: SourceBuffer
    +
    ParameterTypeNullableOptionalDescription
    |type|{{DOMString}}
    Return type: SourceBuffer
    removeSourceBuffer

    Removes a {{SourceBuffer}} from {{MediaSource/sourceBuffers}}.

    @@ -574,7 +574,7 @@

    Attributes

  • Destroy all resources for |sourceBuffer|.
  • ParameterTypeNullableOptionalDescription
    |sourceBuffer|{{SourceBuffer}}
    Return type: {{undefined}}
    + class="parameters">
    ParameterTypeNullableOptionalDescription
    |sourceBuffer|{{SourceBuffer}}
    Return type: {{undefined}}
    endOfStream

    Signals the end of the stream.

    @@ -585,7 +585,7 @@

    Attributes

  • Run the [=end of stream=] algorithm with the error parameter set to |error:EndOfStreamError|.
  • ParameterTypeNullableOptionalDescription
    |error|{{EndOfStreamError}}
    Return type: {{undefined}}
    + class="parameters">
    ParameterTypeNullableOptionalDescription
    |error|{{EndOfStreamError}}
    Return type: {{undefined}}
    setLiveSeekableRange
    @@ -608,7 +608,7 @@

    Attributes

    Description - |start| + |start| {{double}} @@ -617,7 +617,7 @@

    Attributes

    The start of the range, in seconds measured from [=presentation start time=]. While set, and if {{MediaSource/duration}} equals positive Infinity, {{HTMLMediaElement}}.{{HTMLMediaElement/seekable}} will return a non-empty TimeRanges object with a lowest range start timestamp no greater than |start|. - |end| + |end| {{double}} @@ -672,7 +672,7 @@

    Attributes

    This method returning true implies that HTMLMediaElement.canPlayType() will return "maybe" or "probably" since it does not make sense for a MediaSource to support a type the HTMLMediaElement knows it cannot play.

    -
    ParameterTypeNullableOptionalDescription
    |type|{{DOMString}}
    Return type: {{boolean}}
    +
    ParameterTypeNullableOptionalDescription
    |type|{{DOMString}}
    Return type: {{boolean}}
    @@ -1179,7 +1179,7 @@

    SourceBuffer Object

    enum AppendMode {
         "segments",
         "sequence"
    -};
    Enumeration description
    segments +}; - + @@ -1434,7 +1434,7 @@

    SourceBuffer Object

    - + @@ -1443,7 +1443,7 @@

    SourceBuffer Object

    - + @@ -2551,7 +2551,7 @@

    Methods

    - + diff --git a/mse.css b/mse.css index 8fa8d20..b2d3e62 100644 --- a/mse.css +++ b/mse.css @@ -6,7 +6,7 @@ table.old-table { border-collapse: collapse; border-style: hidden hidden none hi table.old-table thead, table tbody { border-bottom: solid; } table.old-table tbody th:first-child { border-left: solid; } table.old-table tbody th { text-align: left; } -table.old-table td, table th { border-left: solid; border-right: solid; border-bottom: solid thin; vertical-align: top; padding: 0.2em; } +table.old-table td, table th:not(.prmName) { border-left: solid; border-right: solid; border-bottom: solid thin; vertical-align: top; padding: 0.2em; } dl.switch { padding-left: 2em; } dl.switch > dt { text-indent: -1.5em; } @@ -20,3 +20,63 @@ p + * > li, dd li { margin: 1em 0; } body > form { padding: 4px; border: 1px solid red; background-color: white; } #bug-assist-form { position: fixed; width: 10em; top: 5em; right: 1em; font-family: Tahoma, sans-serif; font-size: 11px; opacity: 0.8; text-align: right; } + +.prmNullTrue, +.prmNullFalse, +.prmOptTrue, +.prmOptFalse { + width: 45px; + text-align: center; +} + +.prmNullTrue, +.prmOptTrue { + color: #0c0; +} + +.prmNullFalse, +.prmOptFalse { + color: #c00; +} + +table.parameters { + border-spacing: 0; + border-collapse: collapse; + margin: 0.5em 0; + width: 100%; +} + +table.parameters { + border-bottom: 1px solid #90b8de; +} + +.parameters th { + color: inherit; + padding: 3px 5px; + text-align: left; + font-weight: normal; +} + +.parameters th:not(.prmName) { + color: #fff; + background: #005a9c; +} + +.parameters td, +.parameters .prmName { + padding: 3px 10px; + border-top: 1px solid #ddd; + vertical-align: top; +} + +.parameters tr:first-child td { + border-top: none; +} + +.parameters .prmName { + width: 100px; +} + +.parameters .prmType { + width: 120px; +}
    Description of {{AppendMode}} enumeration values
    ValueDescription
    segments

    The timestamps in the media segment determine where the [=coded frames=] are placed in the presentation. Media segments can be appended in any order.

    sequence

    Media segments will be treated as adjacent in time independent of the timestamps in the media segment. Coded frames in a new media segment will be placed immediately after the coded @@ -1333,7 +1333,7 @@

    SourceBuffer Object

  • [=Queue a task=] to [=fire an event=] named {{updatestart}} at this SourceBuffer object.
  • Asynchronously run the [=buffer append=] algorithm.
  • -
    ParameterTypeNullableOptionalDescription
    |data|{{BufferSource}}
    Return type: {{undefined}}
    abort
    +
    ParameterTypeNullableOptionalDescription
    |data|{{BufferSource}}
    Return type: {{undefined}}
    abort

    Aborts the current segment and resets the segment parser.

      @@ -1396,7 +1396,7 @@

      SourceBuffer Object

    Description
    |type||type| {{DOMString}} Description
    |start||start| {{double}} The start of the removal range, in seconds measured from [=presentation start time=].
    |end||end| {{unrestricted double}}
    ParameterTypeNullableOptionalDescription
    |index||index| {{unsigned long}}