Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Notices for Jamendo tracks when seeking is impossible #681

Merged
merged 3 commits into from
Jan 21, 2022
Merged

Conversation

zackkrida
Copy link
Member

@zackkrida zackkrida commented Jan 21, 2022

Fixes

Fixes #680 by @zackkrida

Description

Adds a featureNotices feature to the audio track so custom messages can be displayed when any given feature isn't active. It's a bit of an extra abstraction but felt cleaner and simpler than writing some specific hack for this functionality.

a11y info

When the waveform is disabled, it is no longer focusable, so when users tab from the play button they are sent straight to the next play button. This means they are not explicitly informed about the disabled seek bar, but they're also not incorrectly able to focus the waveform or anything worse like that. I'm not sure how to best approach the ideal solution to this.

Caveats

I couldn't get our UA detection to run server-only, which I would have liked. Perhaps this could be refactored in the future to add the parsed UA information to a Vuex store instead of injecting it into the Nuxt context, which would preserve the data on client-side renders after the initial server render, but alas, I tried that and wasn't able to get it to work either. For whatever reason it seemed my mutation wouldn't run.

Testing Instructions

Visit an audio results page in Chrome or Edge and observe the hover effect on a Jamendo track.

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@zackkrida zackkrida requested a review from a team as a code owner January 21, 2022 16:07
@zackkrida zackkrida requested review from krysal and dhruvkb January 21, 2022 16:07
@zackkrida zackkrida added 🕹 aspect: interface Concerns end-users' experience with the software 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents labels Jan 21, 2022
Copy link
Member

@dhruvkb dhruvkb left a comment

Choose a reason for hiding this comment

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

This is awesome, appreciate the forethought to pop features with notices! Approving with a non-blocking suggestion.

Comment on lines +152 to +159

<!-- Seek disabled message overlay -->
<div
v-if="seekDisabledNotice"
class="invisible group-hover:visible group-focus:visible absolute w-full inset-0 flex items-center justify-center font-bold text-xsm bg-yellow/75 z-40"
>
{{ seekDisabledNotice }}
</div>
Copy link
Member

Choose a reason for hiding this comment

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

Imo we use the existing message field, with a prop that allows it to be transient. I doubt the two will ever need to overlap.

Copy link
Member Author

Choose a reason for hiding this comment

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

At a minimum they could definitely share some styles; good suggestion.

@sarayourfriend
Copy link
Contributor

@zackkrida I like this solution but just letting you know I'm going to take some extra time to review this on using JAWS on a Windows VM to make sure that it's a pleasant experience for screen reader users.

FWIW I think just skipping the seeking might be okay for now? I considered suggesting that we added some kind of extra information into the label on the play/pause button to indicate that seeking would be disabled for that particular audio track, but I want to be wary of the fact that if you narrowed a search to just jamendo tracks then every single play/pause button would include this extra information and could be frustrating for the user.

@zackkrida
Copy link
Member Author

I'm going to take some extra time to review this on using JAWS on a Windows VM

@sarayourfriend please do, thank you 😄 Keep that VM hot for #662 later too 😆

@fcoveram
Copy link

I added a few mockups on the Releases file showing the alert message above grid results and in the wave area on both desktop and mobile. The message is primarily static on mobile, yet it shows the playing state through the yellow background.

The limited to Firefox and Safari sounds intentional instead of a condition openverse is dealing with.

@sarayourfriend
Copy link
Contributor

Oh that's something I hadn't considered, how this will appear to Android Chrome users.

@zackkrida zackkrida merged commit 2e7f581 into main Jan 21, 2022
@zackkrida zackkrida deleted the jamendo-notice branch January 21, 2022 20:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jamendo tracks can't be seeked in Blink browsers
4 participants