Skip to content

Improve accessibility of traffic lights: replacing 🟢🟠🔴 with JustTheDoc's labels. #531

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 4 commits into from
Apr 29, 2025

Conversation

samcunliffe
Copy link
Member

@samcunliffe samcunliffe commented Apr 11, 2025

An attempt to solve

by replacing the emoji (same shape different colours) with a JustTheDocs label UI component.
Unfortunately, the JTD-flavoured markdown syntax for this is

Good
{: .label .label-green}

... that is to say: it needs two lines. And obviously, this doesn't work inside markdown tables.

But once upon a time, I learned some HTML 🙃 so we can also access them as

<span class="foo"></span>

tags.


Now! This makes the markdown not look as beautiful/colourful/emojiful when viewed in GitHub...

Screenshot 2025-04-11 at 16 07 24

(though arguably more readable... which is perhaps the accessibility point.)


Here's what it looks like on the built pages:

Screenshot 2025-04-11 at 16 04 10

Screenshot 2025-04-11 at 16 04 17

@samcunliffe samcunliffe linked an issue Apr 11, 2025 that may be closed by this pull request
@samcunliffe samcunliffe self-assigned this Apr 11, 2025
@samcunliffe samcunliffe requested a review from Copilot April 11, 2025 15:12
@samcunliffe samcunliffe added bug Something isn't working website Related to https://github-pages.arc.ucl.ac.uk/python-tooling accessibility Something relating to the ease of accessibility (alt-text, colour choices, language, etc) labels Apr 11, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

docs/pages/templates.md:41

  • There is a typo in the description ('templae'). Please correct it to 'template'.
| [Copier](https://github.com/copier-org/copier)                | A tool to create project templates that are highly configurable. Project configuration can be kept in sync with the templae. | <span class="label label-yellow">Good</span> |

@samcunliffe samcunliffe requested review from dstansby, K-Meech and a team April 11, 2025 15:12
@samcunliffe samcunliffe added the needs-2-reviewers Could be considered "controversial" so worth a second pair of eyes label Apr 11, 2025
@samcunliffe
Copy link
Member Author

Feels like it's a change warranting two reviewers.

Copy link
Member

@paddyroddy paddyroddy left a comment

Choose a reason for hiding this comment

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

This looks like a really nice change 👌

Co-authored-by: Patrick J. Roddy <[email protected]>
Copy link

@K-Meech K-Meech left a comment

Choose a reason for hiding this comment

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

This looks great - thanks @samcunliffe ! I just noticed a couple of places where the label had been changed - see below:

@samcunliffe
Copy link
Member Author

This looks great - thanks @samcunliffe ! I just noticed a couple of places where the label had been changed - see below:

😱

I did a find-and-replace. How... 🫠 !?

@samcunliffe samcunliffe requested a review from K-Meech April 28, 2025 07:47
@paddyroddy
Copy link
Member

I did a find-and-replace. How... 🫠 !?

How did you perform this? I've never missed anything in an IDE, but have seen others miss them using grep etc.

@samcunliffe
Copy link
Member Author

I did a find-and-replace. How... 🫠 !?

How did you perform this? I've never missed anything in an IDE, but have seen others miss them using grep etc.

No, it was the VSCode cmd+F. And it takes emoji as a searchable string. I think it must have been leftover from my experiments and I didn't git restore properly.

Copy link

@K-Meech K-Meech left a comment

Choose a reason for hiding this comment

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

Thanks @samcunliffe - all looks good now!

@samcunliffe samcunliffe merged commit 13fe03e into main Apr 29, 2025
15 checks passed
@samcunliffe samcunliffe deleted the improve-colour-accessibility branch April 29, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Something relating to the ease of accessibility (alt-text, colour choices, language, etc) bug Something isn't working needs-2-reviewers Could be considered "controversial" so worth a second pair of eyes website Related to https://github-pages.arc.ucl.ac.uk/python-tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improving the traffic light system for colour blindness
3 participants