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

Feature/f 160 accessibility improvements #124

Merged
merged 21 commits into from
Jan 12, 2025

Conversation

Esoteriker
Copy link
Collaborator

@Esoteriker Esoteriker commented Dec 10, 2024

Before totally ok for lighthouse a11y score


Screenshot 2024-12-10 at 23 02 24

Right now struggling on solve this issue since no enough hint and explaination about this error from devtools,
its really hard to find solution to resolve contrast issue. Before it works but from idk some timepoint it doesn't work anymore

Screenshot 2024-12-19 at 22 23 00

Now issue has been adressed in MapLegendLoader once delete this component ,then lighthouse works again. But why is this happend no idea, I found nothing related to color contrast. @marinovl7 @Tschonti


This pull request focuses on improving accessibility across various components and adding new accessibility-related features. The most important changes include adding aria-labels to interactive elements, enhancing color contrast, and ensuring proper HTML structure for better accessibility.

Accessibility Improvements:

  • Aria-labels and attributes:

    • Added aria-label to buttons in AccordionBoxItems.tsx, Chatbot.tsx, LegendContainer.tsx, ZoomControl.tsx, and ThemeSwitch.tsx to improve accessibility for screen readers. [1] [2] [3] [4] [5] [6]
    • Added aria-hidden="true" to Skeleton components in multiple files to indicate that these elements are for visual presentation only and should be ignored by screen readers. [1] [2] [3] [4] [5]
  • Color contrast and styles: This is what I do for other pages, to improve contrast, so you will see it works for other pages but for map page, currently lighthouse not working because of contrast error.

    • Updated link styles in ExternalLink.tsx, StyledLink.tsx, and Topbar.tsx to ensure sufficient color contrast between text and background for better readability. [1] [2] [3]
  • Map accessibility:

    • Introduced AccessibilityOperations class to add aria-labels and styles to map markers, making them more accessible and easier to interact with. [1] [2]

These changes significantly enhance the accessibility of the application, making it more user-friendly for individuals with disabilities.

Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for wfp-hungermap ready!

Name Link
🔨 Latest commit 57360ef
🔍 Latest deploy log https://app.netlify.com/sites/wfp-hungermap/deploys/6782f5a44ca78a000854293d
😎 Deploy Preview https://deploy-preview-124--wfp-hungermap.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Tschonti
Copy link
Collaborator

oopsie, didn't realise this task was assigned to you so I also worked on a11y in #131. I didn't do much with the contrast so your solution is definitely better, but yu can check mine, maybe you can use something from there.

Also leaflet puts role='button' on every marker, so we probably won't get a perfect score, but that warning is also on the old hungermap

@Esoteriker
Copy link
Collaborator Author

oopsie, didn't realise this task was assigned to you so I also worked on a11y in #131. I didn't do much with the contrast so your solution is definitely better, but yu can check mine, maybe you can use something from there.

Also leaflet puts role='button' on every marker, so we probably won't get a perfect score, but that warning is also on the old hungermap

Yes, I will check it, we will try to improve our score as much as possible, after merge your and my PR I think we will have made a lot of improvements.

@Tschonti
Copy link
Collaborator

feel free to merge this before mine btw, you're solutions are much better and I wasn't supposed to work on a11y anyway

@Esoteriker Esoteriker marked this pull request as ready for review December 19, 2024 22:58
@Esoteriker
Copy link
Collaborator Author

Finally, a11y works again locally, to be check in preview!

@marinovl7 marinovl7 merged commit 2639cb8 into main Jan 12, 2025
5 checks passed
@marinovl7 marinovl7 deleted the feature/f-160-accessibility-improvements branch January 12, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants