a11y:视频聊天的正确“<track>”元素是什么?

a11y: What is the correct `<track>` element for video chats?

我正在使用 React 构建一个视频聊天应用程序。

当我使用 <video /> 元素时,我的 ESLint plugin for writing accessible UI 对我大喊 <track /> 元素丢失。

代码:

function Video({ autoPlay, playsInline, videoEl }) {
  return <video autoPlay={autoPlay} playsInline={playsInline} ref={videoEl} />;
}

警告:

error  Media elements such as <audio> and <video> must have a <track> for captions  jsx-a11y/media-has-caption 

在我查找 <track /> 之后,它似乎需要一个带有 .vtt 文件的 src 属性。但在视频聊天中,没有字幕。使视频聊天的 HTML 易于访问的最方便的方法是什么?

您可以完全忽略此消息

这里指的是 WCAG 指南:Understanding Success Criterion 1.2.4: Captions (Live)

指南明确指出:

This success criterion was intended to apply to broadcast of synchronized media and is not intended to require that two-way multimedia calls between two or more individuals through web apps must be captioned regardless of the needs of users.