WordPress.org

Make WordPress Core

Opened 11 months ago

Last modified 8 months ago

#47559 closed defect (bug)

Subtitle tracks use English as default (hardcoded) in track element srclang and label attributes — at Version 10

Reported by: BjornW Owned by: audrasjb
Milestone: 5.3 Priority: normal
Severity: normal Version: 5.2.2
Component: Media Keywords: has-screenshots has-patch
Focuses: ui, accessibility, javascript Cc:

Change History (14)

#1 @SergeyBiryukov
11 months ago

  • Component changed from General to Media

@BjornW
11 months ago

Screencast of subtitle issues #1 adding is way too hard #2 Any subtitle added is considered English even when not..

@BjornW
11 months ago

Screenshot of video block in Gutenberg editor has no option to set subtitles

@BjornW
11 months ago

Press the edit video button to add subtitles. As far as I can tell this is the only way to add subtitles...

#2 @BjornW
11 months ago

  • Focuses ui accessibility added
  • Version set to 5.2.2

Currently (using version 5.2.2) adding a subtitle is needlessly opaque as you can see in the attached screencast. As far as I can tell, it is only possible via the video widget if someone presses the 'edit video' button.

I'd consider this a quite annoying usability issue which I think we need to address rather sooner than later since subtitles are considered best practices for accessibility. Not to mention required for WCAG compliance.

A user might accidentally press the edit video button in the video widget, but nothing indicates that they are able to add subtitles via this button. Adding video via the Gutenberg video block doesn't help either. It has no option to add subtitles at all.

The other issue is that any subtitle added to a video is considered English. Regardless of the contents of the subtitle file's language or the language chosen in WordPress. This is clearly a bug, although while grepping through the trunk source I noticed srclang has been set to 'English' hardcoded.

As the current UI/UX for adding subtitles is already problematic (to say the least), adding an option to set the subtitle label and scrlang attributes feels like polishing a turd.

I'd like to discuss possible solutions to solve this issue and I'm willing to help out with this provided a Core committer commits to solving this issue as well. Without a Core committer I'm not willing to spend any time on patches since they'll probably be lingering for months or even years.

PS: Sorry about the numbers linking (can't edit this) in the attached screencast description.

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


10 months ago

#4 follow-up: @afercia
10 months ago

  • Focuses javascript added
  • Keywords needs-patch has-screenshots added
  • Milestone changed from Awaiting Review to 5.3

Discussed during today's accessibility bug scrub and agreed this is something to fix.

The inability to properly set the language is, well a bit unfortunate and should definitely be fixed. Also the UI should make this task easier.

Proposing for 5.3 consideration.

#5 in reply to: ↑ 4 @BjornW
10 months ago

Hi @afercia,

Great to hear this issue is considered for 5.3. What's the next step in making this happen? Is there already a plan for fixing the UI/UX for the subtitles? Or is this something we need to discuss?

#6 @afercia
10 months ago

Hello @BjornW! For Gutenberg, there's already this issue (created 1 year ago at the time of writing) with some UI explorations: https://github.com/WordPress/gutenberg/issues/7673

Discussion with the media and design teams would certainly help in framing the steps to take. For now, I'd tend to think the best option would be focusing on the functionality part. Specifically: find a way to get a list of languages (language code / language name) and make it available in the media views. Once that works, focus on the UI, both in the Classic Editor and in Gutenberg.

Any help would be greatly appreciated so if you're willing to start exploring, that would be very welcome!

#7 @audrasjb
10 months ago

  • Owner set to audrasjb
  • Status changed from new to accepted

@audrasjb
10 months ago

Proposal: manual language selector

#8 @audrasjb
10 months ago

  • Description modified (diff)
  • Keywords needs-design-feedback added

#9 @audrasjb
10 months ago

Hi there,

I tried a workaround (see screenshot above): add a language selector so we can populate both srclang and label attributes.

Works fine on my side, adding needs-design-feedback keyword since we'll need a design feedback before making a proper patch.

(I also commented in the related Gutenberg GitHub issue)

Cheers,
Jb

#10 @audrasjb
10 months ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.