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

Infrastructure: Fix color contrast failure in HTML source display #2939

Merged
merged 4 commits into from
Apr 7, 2024

Conversation

evmiguel
Copy link
Contributor

@evmiguel evmiguel commented Feb 29, 2024

This PR addresses #2815. I upgraded highlight.js to get the latest features, as we were behind a few major versions.


WAI Preview Link (Last built on Thu, 29 Feb 2024 15:49:24 GMT).

@evmiguel evmiguel marked this pull request as ready for review February 29, 2024 15:57
Copy link
Contributor

@alflennik alflennik left a comment

Choose a reason for hiding this comment

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

Nice fix! I didn't understand 100% about the change from the "
" to "\n" so in addition to checking this example I went through about half of the examples just verifying that they all look right, as well as reading them with a screen reader. Everything seems perfect. Happy to approve.

@evmiguel
Copy link
Contributor Author

evmiguel commented Mar 6, 2024

@alflennik The change from <br> to \n was because highlightjs stopped supporting break tags. See highlightjs/highlight.js#3285 (comment)

Copy link
Contributor

@howard-e howard-e left a comment

Choose a reason for hiding this comment

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

@evmiguel thanks for demoing this recently! And can confirm this addresses the reported issues from #2815:

@howard-e
Copy link
Contributor

howard-e commented Mar 6, 2024

@a11ydoer could you also confirm this resolves the issue as expected?

@howard-e howard-e requested a review from a11ydoer March 6, 2024 16:49
/*!
Highlight.js v11.9.0 (git: b7ec4bfafc)
(c) 2006-2023 undefined and other contributors
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the license export might have glitched

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nschonni thanks for catching this. I just downloaded the file for consumption. Is there a good way to fix this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure, maybe it was a temporary glitch on the site generator, assuming that's how you grabbed it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nschonni Yes, I just went to the downloads page and grabbed it there.

Copy link
Contributor

@howard-e howard-e Mar 19, 2024

Choose a reason for hiding this comment

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

Yep confirming I'm also getting undefined from the exporter at https://highlightjs.org/download. We could make an assumption about that name based on the repository's LICENSE, though we shouldn't include it here.

Seems like something we can make an issue about on their repository and update this file when that's fixed.

Copy link
Contributor

@howard-e howard-e Mar 19, 2024

Choose a reason for hiding this comment

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

There is now an open issue to track this bug, highlightjs/highlight.js#4016

@css-meeting-bot
Copy link
Member

The ARIA Authoring Practices (APG) Task Force just discussed Infrastructure: Fix syntax highlighting bug on examples by evmiguel · Pull Request #2939 · w3c/aria-practices.

The full IRC log of that discussion <jugglinmike> subtopic: Infrastructure: Fix syntax highlighting bug on examples by evmiguel · Pull Request #2939 · w3c/aria-practices
<jugglinmike> github: https://github.com//pull/2939
<jugglinmike> Matt_King: I think this needs a visual review
<jugglinmike> Jem: I will do it

Copy link
Contributor

@a11ydoer a11ydoer left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the inconsistent color coding issues while you are also updating the package. They look great.

@mcking65 mcking65 changed the title Infrastructure: Fix syntax highlighting bug on examples Infrastructure: Fix color contrast failure in HTML source display Apr 7, 2024
@mcking65 mcking65 merged commit 994d35f into main Apr 7, 2024
7 checks passed
@mcking65 mcking65 deleted the fix-highlight-syntax branch April 7, 2024 16:24
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.

7 participants