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

ER: Use the SVGs in the src attribute in img tags, and write up details for wiki #4242

Closed
2 of 5 tasks
ExperimentsInHonesty opened this issue Mar 22, 2023 · 13 comments
Closed
2 of 5 tasks
Assignees
Labels
Complexity: Medium Complexity: See issue making label See the Issue Making label to understand the issue writing difficulty level Draft Issue is still in the process of being created ER Emergent Request Feature: Wiki P-Feature: Project Info and Page A project's detail page (e.g. https://www.hackforla.org/projects/100-automations) role: front end Tasks for front end developers size: 0.25pt Can be done in 0.5 to 1.5 hours

Comments

@ExperimentsInHonesty
Copy link
Member

ExperimentsInHonesty commented Mar 22, 2023

Emergent Requirement - Problem

We need a new issue for making each of the SVGs on the individual project pages have alt="" Which will require wrapping them in an <img src="...

Issue you discovered this emergent requirement in

Date discovered

2023-03-21

Did you have to do something temporarily

  • YES
  • NO

Who was involved

@ExperimentsInHonesty @JessicaLucindaCheng

What happens if this is not addressed

We don't have alt text for the SVGs which is not WCAG compliant.

Resources

image

Recommended Action Items

  • Make a new issue
  • Discuss with team
  • Let a Team Lead know

Potential solutions [draft]

@ExperimentsInHonesty ExperimentsInHonesty added the size: 0.25pt Can be done in 0.5 to 1.5 hours label Mar 22, 2023
@github-actions github-actions bot added Feature Missing This label means that the issue needs to be linked to a precise feature label. role missing labels Mar 22, 2023
@ExperimentsInHonesty ExperimentsInHonesty added role: front end Tasks for front end developers Complexity: Medium P-Feature: Project Info and Page A project's detail page (e.g. https://www.hackforla.org/projects/100-automations) and removed Feature Missing This label means that the issue needs to be linked to a precise feature label. role missing labels Mar 22, 2023
@JessicaLucindaCheng JessicaLucindaCheng added the ready for dev lead Issues that tech leads or merge team members need to follow up on label Mar 23, 2023
@ExperimentsInHonesty ExperimentsInHonesty added this to the w. Accessibility milestone Mar 23, 2023
@JessicaLucindaCheng JessicaLucindaCheng changed the title ER: Wrap the SVGs in image tags, and write up details for wiki ER: Use the SVGs in the src attribute in img tags, and write up details for wiki Mar 25, 2023
@JessicaLucindaCheng
Copy link
Member

Here is a wiki page for how to make a SVG WCAG compliant: https://github.com/hackforla/website/wiki/How-to-make-SVGs-and-other-images-WCAG-compliant

@roslynwythe
Copy link
Member

@ExperimentsInHonesty
Copy link
Member Author

@JessicaLucindaCheng The wiki page doesn't mention which method we prefer. Or when to use either method. Is that something we want to do and does it belong in a decision record referenced by that page?

@JessicaLucindaCheng

This comment was marked as outdated.

@jdingeman

This comment was marked as outdated.

@roslynwythe roslynwythe self-assigned this May 3, 2023
@roslynwythe

This comment was marked as outdated.

@github-actions

This comment was marked as resolved.

@roslynwythe

This comment was marked as outdated.

@JessicaLucindaCheng

This comment was marked as outdated.

@kimberlytanyh kimberlytanyh added the ER Emergent Request label Sep 10, 2023
@roslynwythe
Copy link
Member

roslynwythe commented Oct 12, 2023

  • update: Replace inline SVGs with IMG elements in Projects' Resources section #4291 did provide a descriptive name for the svgs in the Resource section of the project page, however there was an undesirable side-effect; that is, the <a> elements that wrap the svgs took on an additional name, and as a result, when the screen reader is focused on the link element, it reads a duplicate name, for example: "GitHub GitHub". This is due to the fact that link elements are assigned "accessible names" based on concatenation of the accessible names of their child elements. A child element (<h4>GitHub</h4>) alread exists and so adding the aria-label to the div adds another name.

The two best solution I've found so far is:

  • do not wrap the svg in a div with 'aria-label' and role="img"
  • wrap the svg in another svg element. The outer svg element should have:
    • attribute role="img"
    • attribute aria-labelledby="titleID"
    • the first child element: <title id="titleID">ANAME</title>
      • where ANAME is the accessible name (ie the "alternative text")

@roslynwythe roslynwythe added the Draft Issue is still in the process of being created label Oct 24, 2023
@roslynwythe roslynwythe removed the ready for dev lead Issues that tech leads or merge team members need to follow up on label Oct 24, 2023
@ExperimentsInHonesty

This comment was marked as outdated.

@ExperimentsInHonesty ExperimentsInHonesty added the Complexity: See issue making label See the Issue Making label to understand the issue writing difficulty level label Apr 2, 2024
@roslynwythe
Copy link
Member

roslynwythe commented Apr 15, 2024

@roslynwythe
Copy link
Member

Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Medium Complexity: See issue making label See the Issue Making label to understand the issue writing difficulty level Draft Issue is still in the process of being created ER Emergent Request Feature: Wiki P-Feature: Project Info and Page A project's detail page (e.g. https://www.hackforla.org/projects/100-automations) role: front end Tasks for front end developers size: 0.25pt Can be done in 0.5 to 1.5 hours
Development

No branches or pull requests

5 participants