Does it make any sense to use subtitles on an audio?

Asked

Viewed 79 times

1

Well, obviously a caption is used in a video or in a game so that the text can accompany the image as it has some dialogue or translation, etc. Maybe I’m wrong, but in my head it doesn’t make sense to use the element <track> along with the element <audio> since a legend requires some visual component to make sense of its use, already an element of <audio> has no visual component, so it makes no sense to use the element <track> along with the element <audio>, this caught my attention by reading an article from MDN Web Docs saying:

The HTML <track> element is used as a child of <audio> and <video media elements>.

Source: MDN Web Docs

What is the sense of using the element <track> in one element <audio>, It was a misunderstanding of mine, please, someone explain it to me?

  • 3

    And if the person is hearing impaired?

1 answer

4


Of course it makes sense, it wouldn’t be great to be able to listen to an English podcast while Portuguese subtitles appear?

Face no offense, but it seems you don’t quite understand the things involved in the tag <track>.

She is MUCH, but than just subtitles...

It has many other attributes to ensure good accessibility and SEO of your content. In the tag track vc tb can set the language of the content of track (srclang="en") and can for example make an "alt" using the descriptions to give details of what is expected to be found in the audio content for each language, etc.

<audio src="foo.ogg">
    <!-- legendas -->
    <track kind="captions" src="ingles.vtt" srclang="en" label="Inglês">
    <track kind="captions" src="japones.vtt" srclang="jp" label="Japonês">
    <track kind="captions" src="japones.vtt" srclang="pt-br" label="Português">
    <!-- descrição -->
    <track kind="descriptions" src="DescricaoIngles.vtt" srclang="en">
    <track kind="descriptions" src="DescricaoJapones.vtt" srclang="jp">
    <track kind="descriptions" src="DescricaoPortugues.vtt" srclang="pt-br">
</audio> 

So even for those who see, you can listen to an audio in Japanese, and read a caption in Portuguese, this would be VERY interesting do not think?

Your vision has become very limited, there are people who can’t see with their eyes but with a screen reader, and there are people who can see with their eyes, but can’t hear. But that doesn’t stop you from using the track to optimize SEO and be more inclusive.

  • yes, but in the case of the caption if I use in an audio, where they will be displayed?

  • That part that wasn’t very clear to me!

  • 1

    @ledeveloper does not matter if it is audio or video, accessibility issue and the tag track is not only to put subtitles as I said, it has discriptions, Langs and various other attributes. The "subtitles" of the audio will be read by the screen player for example. Sometimes this article may interest you, there they explain how to capture track tags and manipulate content with JS https://www.html5rocks.com/pt/tutorials/track/basics/ in this other article also has some interesting things https://html.com/tags/track/

  • 1

    thank you so much for your attention in helping! now it’s clearer :)

  • 1

    "Your vision has become very limited" - the joke was intentional? :-)

  • 1

    @hkotsubo I used [Ironic-mode-on] in that part

  • I tested your example, but what is being accessible to the user who can’t hear?

  • @Miriancherbo the subtitle of the audio/video, the file .vtt

  • @hugocsl, okay :|

Show 4 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.