Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sets ‘has captions or subtitles accessibility’ label #3608

Conversation

LianaHarris360
Copy link
Member

@LianaHarris360 LianaHarris360 commented Sep 6, 2022

Summary

Description of the change(s) you made

This PR checks the ‘has captions or subtitles accessibility’ label automatically if the uploaded subtitle file language is the same as the video file language. The language dropdown placement for the captions and subtitles section was previously shown underneath it but would be cut off. This PR changes the placement of the menu options to show above instead.

Manual verification steps performed

  1. Uploaded video file
  2. Set the Language of the video file to English
  3. Underneath Captions and subtitles, set the language of the subtitles file to English
  4. Uploaded a sample subtitle file
  5. Confirmed that the ‘Has captions or subtitles’ checkbox was checked

Screenshots (if applicable)

Checked ‘Has captions or subtitles’ checkbox.
Screen Shot 2022-09-06 at 1 34 50 PM

Previous placement for language dropdown underneath Captions and subtitles section.
Screen Shot 2022-09-06 at 1 51 06 PM

Updated language dropdown placement.
Screen Shot 2022-09-06 at 1 33 37 PM

Does this introduce any tech-debt items?


Reviewer guidance

How can a reviewer test these changes?

  1. Upload video file
  2. Underneath Audience, set the Language of the video file
  3. Underneath Captions and subtitles, set the language of the subtitles file and upload a .vtt file
  4. If the subtitles file language and the video file language match, the ‘Has captions or subtitles’ checkbox should be checked.

References

Fixes #3576

Comments

Note: The ‘Has captions and subtitles’ checkbox label description needs to be updated.

Radina and Jessica agree that the label is descriptive enough and suggest removing the info icon next to the label and reordering this label to be first in the list instead since it’s expected to be the most commonly used option out of those three.

Accessibility


Contributor's Checklist

Studio-specifc:

  • All user-facing strings are translated properly
  • The notranslate class been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)
  • All UI components are LTR and RTL compliant
  • Views are organized into pages, components, and layouts directories as described in the docs
  • Users' storage used is recalculated properly on any changes to main tree files
  • If there new ways this uses user data that needs to be factored into our Privacy Policy, it has been noted.

Testing:

  • Code is clean and well-commented
  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Any new interactions have been added to the QA Sheet
  • Critical and brittle code paths are covered by unit tests

Reviewer's Checklist

This section is for reviewers to fill out.

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

…itle file language is the same as the video file language
Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix works as described, code changes make sense. Just one debugging statement to remove.

subtitleFileLanguageComparison(file) {
if (this.oneSelected && this.language === file.language) {
this.accessibility = [...this.accessibility, AccessibilityCategories.CAPTIONS_SUBTITLES];
console.log({ ...this.accessibility });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should remove this debugging statement.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed!

@@ -196,7 +196,7 @@ export const ContentModalities = {
export const AccessibilityCategoriesMap = {
// Note: audio is not included, as it is rendered in the UI differently.
document: ['ALT_TEXT', 'HIGH_CONTRAST', 'TAGGED_PDF'],
video: ['SIGN_LANGUAGE', 'AUDIO_DESCRIPTION'],
video: ['SIGN_LANGUAGE', 'AUDIO_DESCRIPTION', 'CAPTIONS_SUBTITLES'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like an important bug fix in its own right!

@LianaHarris360 LianaHarris360 merged commit 0a180e6 into learningequality:unstable Sep 8, 2022
@LianaHarris360 LianaHarris360 deleted the set-has-captions-label branch September 8, 2022 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set "has captions" metadata label when accessibility captions are added to a video
2 participants