8000 Accessibility improvements to site by trallard · Pull Request #242 · conda/conda-dot-org · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Accessibility improvements to site #242

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

Merged
merged 23 commits into from
Jun 14, 2025

Conversation

trallard
Copy link
Member

Description

I thought it was as good time as any to give this site a bit of care 🧽 and make it a bit more accessible:

  • There were several colour contrast issues. Upon closer inspection, there were too many colours used/, which made consistent use tricky (and also harder to maintain). So I simplified the colour palette, removed redundant colours, and updated the style guide.
  • Links also needed a non-colour-related cue to make them more accessible and in alignment with WCAG standards. I added an underline and distinct hover affordances, too.
  • Finally, I made some small edits to the contribution guidelines and readme
  • If I have added a new page to learn/ or community/, I have added it to the corresponding _sidebar.json file.

@trallard trallard requested review from a team as code owners April 17, 2025 16:27
Copy link
netlify bot commented Apr 17, 2025

Deploy Preview for conda-dot-org ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 46306ca
🔍 Latest deploy log https://app.netlify.com/projects/conda-dot-org/deploys/684c4dd80d2d25000705a4a0
😎 Deploy Preview https://deploy-preview-242--conda-dot-org.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 69 (🔴 down 15 from production)
Accessibility: 97 (🟢 up 4 from production)
Best Practices: 100 (no change from production)
SEO: 89 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

Comment on lines -28 to -32
--ifm-h2-font-size: 1.5rem;
--ifm-h3-font-size: 1.25rem;
--ifm-h4-font-size: 1rem;
--ifm-h5-font-size: 0.875rem;
--ifm-h6-font-size: 0.85rem;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the same as the default ones so they seemed redundant.

Comment on lines +199 to +203
.color-table {
width: 90%;
max-width: 600px;
margin-top: 20px;
overflow: hidden;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added so we could have a nice table in the style guide.

@jaimergp
Copy link
Contributor

Do we need underlines in eeevery link? Looking at conda-forge.org, the buttons and navigation bars do not have them, and afaicr they were also compliant with WCAG. See their custom CSS rules.

@trallard
Copy link
Member Author
trallard commented Apr 17, 2025

Do we need underlines in eeevery link? Looking at conda-forge.org, the buttons and navigation bars do not have them, and afaicr they were also compliant with WCAG. See their custom CSS rules.

That depends. We do not need default underlines in the navbar as long as there are at least underlines on hover. Currently, there are none, so we rely solely on colour. So if you prefer no default underlines we can remove them.

We can remove the underlines with buttons, but I will need to see if the current colour vs hover colour are distinct enough (hue and luminosity) or tweak those.

For example, the conda-forge.org ones do have a significant change in hue + luminosity on hover (white vs grey)
conda-forge___community-driven_packaging_for_conda

Adding a general underline is the quickest way to add non-colour-only affordances for accessibility purposes and move towards conformance with WCAG.
If preferred, I can also go into finer detail and tweak some components so that it is not so heavy on the underlines and I have no strong feelings either way.

@jaimergp
Copy link
Contributor

That depends. We do not need default underlines in the navbar as long as there are at least underlines on hover. Currently, there are none, so we rely solely on colour. So if you prefer no default underlines we can remove them.

Yes, I'd prefer that. The way we do it in conda-forge.org looks nicer to me.

If preferred, I can also go into finer detail and tweak some components so that it is not so heavy on the underlines and I have no strong feelings either way.

If we can commit the resources needed to do so, yes, I'd prefer tweaking components where necessary and only use underlines for regular text hyperlinks or where otherwise no alternative can be found with a reasonable amount of effort.

I keep mentioning conda-forge.org as a reference, but if you see that that site is not compliant in some way, let me know and I'll adjust it accordingly! Thank you so much!

@trallard
Copy link
< 8000 span aria-label="This user is a member of the conda organization." data-view-component="true" class="tooltipped tooltipped-n"> Member Author
trallard commented Apr 24, 2025

OK I addressed all the review comments @jaimergp . This aligns now more with what we have on the conda-forge site.
I also added a couple more improvements:

  1. Fixed heading order: avoid having more than one H1 and inconsistent increases
  2. Fixed the card layout. Right now, at a certain display width, the link to the blog post and the date end up overlapping:

Current

image

This PR ✨
conda_org___conda_org_-_Polypane

conda_org___conda_org_-_Polypane

@jaimergp
Copy link
Contributor

Awesome! Looks great. I was reviewing the site now and found a couple of potential improvements:

  • The sidebar for the documentation has underlines on hover now, but I don't think we need them because the background color also reacts on hover. Also not sure if we need an active state style change there too; right now I don't see any.
image
  • The highlighted news card hyperlink is almost black. Does that have sufficient contrast against the gradient background? I would have expected a white-ish one there, like the news header.
image
  • The top-bar conda logo does not react to hover or active states. The anvil on conda-forge.org does have some subtle size change to give a hint.
image

Thanks!

@trallard
Copy link
Member Author
  • I will check the sidebar states.

The highlighted news card hyperlink is almost black. Does that have sufficient contrast against the gradient background? I would have expected a white-ish one there, like the news header.

This has a 7.7:1 contrast ✅ white on green has a 2.7:1
Actually, let me check the news header again 🤔 but my last check did not throw more issues, maybe I missed something.

The top-bar conda logo does not react to hover or active states. The anvil on conda-forge.org does have some subtle size change to give a hint.

I did not even realise, I removed some redundant animations so maybe I removed it then. Checking

@trallard
Copy link
Member Author

@jaimergp I fixed the above items. Note that the sidebar items are in an active state (the text changes to green, but it is too subtle, so we should consider making the font bolder or something.

I also double-checked the contrast for the highlighted (green card), and this statement still holds

This has a 7.7:1 contrast ✅ white on green has a 2.7:1 ⛔

So I had to change the whole text to have better contrast throughout.

Overall this should be ready to merge unless you want to change the active state.

@jaimergp
Copy link
Contributor

Thank you @trallard, looks fantastic!

@jaimergp jaimergp merged commit 1f8a0c1 into conda:main Jun 14, 2025
6 checks passed
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
0