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

[Bug]: Now Playing Icon Needs To Be Accessible #56

Closed
cdrani opened this issue Aug 11, 2023 · 0 comments · Fixed by #62
Closed

[Bug]: Now Playing Icon Needs To Be Accessible #56

cdrani opened this issue Aug 11, 2023 · 0 comments · Fixed by #62
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@cdrani
Copy link
Owner

cdrani commented Aug 11, 2023

Describe the bug

We are currently using a div instead of a button as the parent of the settings icon in the Now Playing Widget. This is not semantically correct and has poor accessibility (a11y). We need to replace the div with a button.

Expected behavior

It should have similar accessible properties as displayed for the heart button and the settings icon on a tracklist/playlist/album track

image image

Additional context

Now Playing Icon file: https://github.com/cdrani/chorus/blob/develop/models/icon.js
Example to reference:

<button
role="snip"
type="button"
aria-label="Edit Snip"
style="visibility:hidden;border:none;background:none;display:flex;align-items:center;cursor:pointer"
>
<svg
role="snip"
fill="none"
width="16"
height="16"
stroke="currentColor"
viewBox="0 0 20 20"
stroke-width="1.5"
style="margin-bottom:4px;"
preserveAspectRatio="xMidYMid meet"
xmlns="http://www.w3.org/2000/svg"
>
<path
role="snip"
stroke-linecap="round"
stroke-linejoin="round"
d="M10.5 6h9.75M10.5 6a1.5 1.5 0 11-3 0m3 0a1.5 1.5 0 10-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-9.75 0h9.75"
/>
</svg>
</button>

Some changes to styles might need to be made to keep the same UI. For example, the visibility attribute does not need to be set as it should always be visible, or the styles coming from the chorus-icon id might need to be updated. Use your discretion and get it as close as possible to the current UI, but just with replacing the div with a button. The a11y portion should transfer over with using the same attributes (role, aria-label, etc) currently on the div and some just based on the button element.

@cdrani cdrani added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant