This issue has been created
 
 
Prism.js Macro / cid:jira-generated-image-avatar-e8ea9a0d-dd61-4082-9f74-53dad8b6ccea XPRISMJS-4 Open

Low contrast on some highlights

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-45564206-d12f-466c-9a0d-6fe9c17d8f16 Charpentier Lucas created this issue on 06/Jun/25 19:14
 
Summary: Low contrast on some highlights
Issue Type: cid:jira-generated-image-avatar-e8ea9a0d-dd61-4082-9f74-53dad8b6ccea Bug
Affects Versions: 1.0.1
Assignee: Unassigned
Attachments: Screenshot from 2025-06-06 18-57-39.png
Created: 06/Jun/25 19:14
Labels: usability wcag
Priority: cid:jira-generated-image-static-minor-d12df3cd-b528-47da-b806-9164e5ae0b29 Minor
Reporter: Charpentier Lucas
Description:

See screenshot attached from the test on xwiki.org, the highlighter does not have default colors that comply with WCAG standards.

There doesn't seem to be one highlighting theme that's accessible yet (https://github.com/PrismJS/website/issues/29), but they did identify the main painpoints https://github.com/PrismJS/prism/pull/2313 . Note that by default our code boxes have a grey background, we might need to make it white or have our own color changes to respect a minimum contrast of 4.5 .

Note that this accessibility issue should be solved if we ever want to move this as the default implementation of the code macro in XS smile.png