Earlier this year, the new PAC 2021 checker was released, and it contained some amazing new features to help us make PDF files compliant. Among the new features was the ability to check compliance against the WCAG specification in addition to the existing ability to check against the PDF/UA standard. Another great addition was checking the color contrast of text elements against their background color. This is a task that, before PAC 2021, was a completely manual process, so when this feature was added, we were all excited at the prospect of not having to painstakingly sift through our files for contrast issues.
As more users started using the PAC 2021 Checker, I started hearing some rumblings from users that contrast issues were being flagged in PAC 2021 for color combinations that did, in fact, meet the color contrast requirements. Initially, I was skeptical that this was happening until it occurred on one of my own projects. I clearly had a color combination that met the color contrast requirements. So I checked and double-checked, and sure enough, PAC 2021 flagged the color combination as an error. So I set out to determine why this was happening.
For my test, I used Adobe InDesign as the source document only because it gives me the most control over content formatting. Whenever I ran into this error, the source document was usually Adobe InDesign. I began by creating a variety of samples using white text on a black background since that’s the highest possible contrast and should always pass. I discovered that basic examples consisting of the background using a filled shape passed without a problem; it wasn’t until I used more advanced formatting techniques that the failure occurred. In InDesign, it’s common to use techniques other than filled shapes for maximum editing capabilities such as rule above/below, underline, and paragraph shading. I discovered that the rule above/below and underline failed even though the color contrast technically passed. All other techniques, including paragraph shading, passed the PAC 2021 Checker without a problem.
I reached out to the developer of PAC 2021 to get some answers as to why this was happening, and they acknowledged the results that I found. It turns out that the rule above/below and underline features in InDesign create the effect using a border property instead of a fill. Currently, the PAC 2021 Checker does not check border properties when it evaluates color contrast, which is why we see the false positives on some elements (such as a rule above/below and underline) in a document. The developer did indicate that they will be adding the border evaluation for color contrast in a future release but could not give a timeframe for the release. Although this testing was done using Adobe InDesign, I would expect similar results in other applications that allow you to apply text formatting attributes similarly.
For now, the answer is to check any failures manually to determine if they do or do not meet the color contrast requirements. I, for one, am very anxious for this problem to be resolved as my clients often request a report confirming full compliance. Unfortunately, when elements don’t pass color contrast in the report, it’s difficult to explain to the client that even though it doesn’t pass the PAC 2021 Checker, the contrast still meets the requirements. Hopefully, this problem is short-lived and will be resolved in the next release.