Skip to content

jsx-a11y/media-has-caption Eslint Warning for Missing Captions in Media Elements #982

Open
@soobing

Description

@soobing

Media elements such as <audio> and <video> are required to have a <track> tag for captions according to eslint jsx-a11y/media-has-caption.

I received an error stating that the <track> tag, which is a child of the <video> tag, is mandatory to have a src attribute. However, it appears that the error is resolved when there is a <track> tag child without a src attribute present.

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

Reproduce

<video></video>

Solved (actually this should not be solved)

<video><track kind="captions" /></video>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions