-
Notifications
You must be signed in to change notification settings - Fork 63
Notices for Jamendo tracks when seeking is impossible #681
Conversation
There was a problem hiding this 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.
|
||
<!-- 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> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@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. |
@sarayourfriend please do, thank you 😄 Keep that VM hot for #662 later too 😆 |
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 |
Oh that's something I hadn't considered, how this will appear to Android Chrome users. |
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
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin