Skip to content

Improve the accessibility of Code Radio app #42236

Closed

Description

@huyenltnguyen

Affected page

https://coderadio.freecodecamp.org/

To Reproduce

I made a quick scan using the axe DevTools browser add-on and found that the page has some critical accessibility issues.

We have 5 errors when the music is not played.

Screen Shot 2021-05-25 at 00 17 29

And 9 when the music is playing (this has to do with the color contrast of the visualizer and the indicator).

Screen Shot 2021-05-25 at 00 23 13

To Resolve

  • Remove aria-label from the canvas element
  • Add aria-label to the button element for song history
  • Add aria-label to the select element used for stream selection
  • Remove user-scalable=no from the meta tag as well as set its maximum-scale to a value that is not less than 5. (axe requires the value to not be less than 2, but Lighthouse sets the bar at 5)
  • Revisit the color contrast of the elements in question

Activity

  1. added
    help wanted
    scope: a11y
    platform: coderadio
    on May 24, 2021
  2. ish-u commented on Jun 1, 2021

    @ish-u

    Hello,
    I would like to help with this issue.

  3. gikf commented on Jun 2, 2021

    @gikf
    Member

    Hey @ish-u

    issues are typically not assigned to specific person, other than long-time contributors, you can read more on https://contribute.freecodecamp.org/#/FAQ?id=how-can-i-get-an-issue-assigned-to-me. Issues with help wanted label are open for contributions for everybody.

    Please make sure you read our guidelines for contributing. Join us in our chat room or the forum if you need help contributing, our moderators will guide you through this.

  4. ish-u commented on Jun 2, 2021

    @ish-u

    Thank You for replying.
    (Sorry i am new to open-source)

  5. ahmaxed commented on Jun 2, 2021

    @ahmaxed
    Member

    Also this is the repo for coderadio. https://github.com/freeCodeCamp/coderadio-client
    I would recommend running it locally and skimming the source code before your first contribution.

  6. ish-u commented on Jun 9, 2021

    @ish-u

    Hello,
    I need help regarding the last point - 'Revisit the color contrast of the elements in question"
    Do I need to change the Colors ?
    Also removing arai-label from Canvas component is not allowed by the Linter

    image

  7. ahmaxed commented on Jun 11, 2021

    @ahmaxed
    Member

    @ish-u, thanks for working on this. If you could list the elements in question, we could change their contrasts accordingly as the tool requires sign up and subscription plan.
    The keyboard shortcuts button has lower opacity by design, but we could change that accordingly.

  8. ish-u commented on Jun 11, 2021

    @ish-u

    Thank You for merging my PR.

    On Google Chrome

    • while not Playing:
      • Keyboard Shorcut
    • while Playing:
      • Keyboard Shorcut
      • Stream Selection

    On Mozilla FireFox:

    • while not Playing:
      • Keyboard Shorcut
    • while Playing:
      • Keyboard Shorcut
      • Stream Selection
      • CurrentSong Component
        • title div
        • artist div
        • album div
  9. ahmaxed commented on Jun 11, 2021

    @ahmaxed
    Member

    Here is the design style guide: https://design-style-guide.freecodecamp.org/

    And here is the colors that are used in the UI: https://github.com/freeCodeCamp/freeCodeCamp/blob/main/client/src/components/layouts/variables.css#L2-L30

    feel free to replace the colors and create a pull request, I will go in the pr and change the colors if necessary.

  10. huyenltnguyen commented on Jun 12, 2021

    @huyenltnguyen
    MemberAuthor

    Hey team, sorry for not being able to respond sooner.

    @ish-u Thank you for the fix! Don't worry, I can take a look at the canvas aria-label issue 🙂

    Regarding the color contrast, we don't have to address them all. axe DevTools, just like other audit tools, cannot be 100% accurate on the errors they flag as they can't determine if the color contrast actually needs to meet the requirement.

    On Google Chrome

    • while not Playing:
      • Keyboard Shorcut
    • while Playing:
      • Keyboard Shorcut
      • Stream Selection

    On Mozilla FireFox:

    • while not Playing:
      • Keyboard Shorcut
    • while Playing:
      • Keyboard Shorcut
      • Stream Selection
      • CurrentSong Component
        • title div
        • artist div
        • album div

    I think the text color of song metadata is sufficient. It is #ffffff on #0A0a23, which yields 19.43:1 in contrast ratio. Same goes for the stream selection as I believe we don't have any custom CSS on it, so it looks the same as the native browser's <select>.

    I'm not on subscription plan either, so I'm not sure which element the tool refers to. Here are just a couple elements I could think of:

    • Keyboard shortcut (as Anmol listed)
    • Visualizer
    • Progress indicator

    We should address the contrast issue for the keyboard shortcut box as it may not be distinguishable by users with low vision. If we think it would be distracting for the users, we can consider making it a popup and add an icon button to the footer to trigger it, similar to how the song history is displayed.

    For the visualizer, I think we can leave it as is, since it is just a decorative component and does not communicate any information or require user's attention. From the "Graphic Objects" section of this guide:

    The term "graphical object" applies to stand-alone icons such as a print icon (with no text), and the important parts of a more complex diagram such as each line in a graph. For simple graphics such as single-color icons the entire image is a graphical object. Images made up of multiple lines, colors and shapes will be made of multiple graphical objects, some of which are required for understanding.

    Not every graphical object needs to contrast with its surroundings - only those that are required for a user to understand what the graphic is conveying.

    I'm a bit concerned with the progress indicator, as it does provide information to the user, thus, needs to meet the contrast ratio requirement, especially when we don't have the song duration on the screen. However, since non-visual users cannot see the progress, we should still render the timer as text, or alternatively use the aria-label attribute to allow screen readers to pick up. I'm not sure if the API returns this piece of information for us or we need to do the calculation ourselves. We can split this into another issue and address it separately though if it is too complex.

  11. huyenltnguyen commented on Jun 12, 2021

    @huyenltnguyen
    MemberAuthor

    Huh, the issue with aria-label on canvas is trickier than I thought.

    According to the HTML specs, canvas can take any ARIA attributes, so I think the this is a bug of the tool

    Screen Shot 2021-06-13 at 04 11 08

    However, according to Deque (the organization behind the Axe tool) and an a11y expert, the role="img" should be set to non-interactive canvas. But the jsx-a11y plugin is currently not allowing it jsx-eslint/eslint-plugin-jsx-a11y#648.

    There is already a PR to update the eslint rule, and we should wait for it before making any change there.

  12. ish-u commented on Jun 13, 2021

    @ish-u

    I also had the doubts regarding the contrast because the tool said something like "needs to be reviewed".
    Maybe we can do something about the Keyboard Shorcuts like move it to the left side of Navigation Bar

  13. huyenltnguyen commented on Jun 14, 2021

    @huyenltnguyen
    MemberAuthor

    IMHO, having the keyboard shortcut box in the Footer component would be more appropriate, as the nav element is usually used for important navigation links.

    I was thinking about placing it on the right side of the Footer, both because it has been on the right side of the screen all along, and since it is less important than other elements, it should be the last item in the compositional flow. That said, I don't have a strong opinion on which side of the Footer it should be.

    I think we can make use of the fa-keyboard-o btw 🙂

  14. ish-u commented on Jun 14, 2021

    @ish-u

    Font Awesome icon would be better

  15. ahmaxed commented on Jun 23, 2021

    @ahmaxed
    Member

    Sure. adding it to the footer with that icon would make sense.
    That being said we will have another button that will toggle the embedded rocketchat.
    I was wondering if we should add some info regarding reporting issues as well.
    That way a question mark icon or an info icon might be more appropriate.

  16. ish-u commented on Jun 24, 2021

    @ish-u

    I can try adding the Issue Report Button.
    where should i place it on navbar on right or left?

  17. huyenltnguyen commented on Jun 29, 2021

    @huyenltnguyen
    MemberAuthor

    @ahmadabdolsaheb Would the chat toggle and the report issue button be separate items or they would be grouped in a menu? I guess grouping them would be better, as the footer would be a little cramped up otherwise.

  18. ahmaxed commented on Jul 1, 2021

    @ahmaxed
    Member

    How about this

    [history] [----------------------------] [play/pause] [volume] [get help(question mark)] [chat]

    get help menu would have the keyboard shortcuts and
    report an issue( should go to the forum under the support category. )

  19. bbsmooth commented on Dec 30, 2021

    @bbsmooth
    Contributor

    Are you still looking for help with accessibility enhancements for the radio? I'm currently preparing for the Web Accessibility Specialist certification offered by the IAAP and would be happy to help out.

  20. ahmaxed commented on Dec 30, 2021

    @ahmaxed
    Member

    @bbsmooth, Yes, please feel free to take a look.
    Additionally, we would also appreciate taking a look at the editor in our new curriculum. Here is a link: https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-1

  21. Ajob41 commented on Dec 30, 2021

    @Ajob41
  22. bbsmooth commented on Jan 4, 2022

    @bbsmooth
    Contributor

    @ahmadabdolsaheb I've started making accessibility updates to the radio and have already submitted three PRs.

  23. ahmaxed commented on Jan 5, 2022

    @ahmaxed
    Member

    @Ajob41, I agree that this issue's main focus has shifted. I will summarize and recreate another one shortly.
    @bbsmooth thanks for the prs.

  24. ahmaxed commented on Feb 2, 2022

    @ahmaxed
    Member

    thanks to @bbsmooth a lot of the accessibility issues have been resolved, so I will close this issue accordingly.
    We can continue the discussion around the footer optimizations in a related issue if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedplatform: coderadioscope: a11y

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions