Skip to content

[ErrorHandler] [A11y] Simple proposal for color updates on error stack traces against colorblindness #59334

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 1 commit into from
Jan 1, 2025

Conversation

DocFX
Copy link
Contributor

@DocFX DocFX commented Dec 31, 2024

Q A
Branch? 7.3
Bug fix? no
New feature? no
Deprecations? no
Issues N/A
License MIT

Hi!

I'm colorblind, slightly. I know it can be a real headache to try colors that can match all colorblindnesses, it's a nightmare, as a lot of them are opposed and as some fixes can actually make things worse for other people.

I just open this with a very small changeset in colors for stack traces. The rest of the debug pages seem OK to me (profiler, tables, etc.). But currently I'm really struggling to read the highlighted lines and the dark red PHP syntax highlighting for native identifiers.

I only changed those colors, trying to make it better.
Feel free to discuss better proposals, like using the WebAIM WCAG 2.0 checker (https://webaim.org/resources/contrastchecker/).

Background to red text: https://webaim.org/resources/contrastchecker/?fcolor=FF7B72&bcolor=2E3136

Highlight to PHP identifiers will fail, but it's almost impossible without changing all colors. 1.94/1 is still acceptable as most characters are non-word: https://webaim.org/resources/contrastchecker/?fcolor=71663ACC&bcolor=FF7B72

If anyone thinks we can come up with better proposals, there you go!
At least this fixes it for me and non-colorblind people around me seem to find it still readable, if not better, too. :)

@DocFX DocFX requested a review from yceruto as a code owner December 31, 2024 02:24
@carsonbot carsonbot added this to the 7.3 milestone Dec 31, 2024
@OskarStark
Copy link
Contributor

OskarStark commented Dec 31, 2024

Thank you, can you add some before and after screenshots?

@carsonbot carsonbot changed the title [A11y] Simple proposal for color updates on error stack traces against colorblindness [ErrorHandler] [A11y] Simple proposal for color updates on error stack traces against colorblindness Dec 31, 2024
@DocFX
Copy link
Contributor Author

DocFX commented Dec 31, 2024

Thank you, can you add some before and after screenshots?

Sure! Here's a first try!

Before:

{7E624852-1540-4AEB-BDD4-F5125D65D3D0}

After commit:

{B536BA5A-47D3-44BC-AB20-DAE1E08518CB}

Copy link
Member

@xabbuh xabbuh left a comment

Choose a reason for hiding this comment

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

I would also vote to merge this as a bugfix.

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

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

As a bugfix

@fabpot
Copy link
Member

fabpot commented Jan 1, 2025

Definitely a bug fix.

@fabpot fabpot modified the milestones: 7.3, 6.4 Jan 1, 2025
@fabpot
Copy link
Member

fabpot commented Jan 1, 2025

Thank you @DocFX.

@fabpot fabpot merged commit 006bbba into symfony:6.4 Jan 1, 2025
11 checks passed
This was referenced Jan 29, 2025
@fabpot fabpot mentioned this pull request Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants