コントラスト比のISO・WCAG基準は不適切(特に白抜きの文字の場合)

文字と背景色のコントラスト比について、ISO/WCAGで推奨値が定められている。解説ページは色々あるが、とりあえずWCAG2.0の日本語訳解説はこちら。ISO-9241-3及びANSI-HFES-100-1988に基づいているとされている。

達成基準 1.4.3 を理解する | WCAG 2.0解説書

達成基準 1.4.6 を理解する | WCAG 2.0解説書

これを鵜呑みにしている解説記事の多いこと…。で、文字が白抜きの場合にこの推奨値を適用するとおかしいだろという話。

"contrast white text"とかでググってみるといくつか記事が見つかった。

For many of us, some of these combinations are not very readable. That is why 4.5:1 is a minimal contrast ratio.

多くの人にとって、これらの組み合わせの中には、あまり読みやすくないものもあります。だからこそ、4.5:1は最低限のコントラスト比なのです。

WebAIM: Contrast and Color Accessibility - Understanding WCAG 2 Contrast and Color Requirements

Myth 1: The WCAG requirements are always optimal

One case where the WCAG standards aren’t applicable is with the brightness contrast of white text.

迷信1:WCAG要件は常に最適である

WCAG規格が適用されないケースの一つに、白文字の明るさのコントラストがあります。

The Myths of Color Contrast Accessibility

もう少し探してみると、この「The Myths of Color Contrast Accessibility」の記事に対する返答の記事を見つけた。

There is no "Myths of Color Contrast Accessibility"

この中で、WCAG2.2および3.0に向けて以下の議論が行われていることが分かった。

Contrast Ratio Math and Related Visual Issues · Issue #695 · w3c/wcag · GitHub

The W3C's specification for determining sRGB contrast as discussed in "Understanding WCAG 2.0 and 2.1, Minimum Contrast 1.4.3" is not perceptually uniform and as a result creates "contrast ratios" that are not meaningful.

「Understanding WCAG 2.0 and 2.1, Minimum Contrast 1.4.3」で説明されているsRGBコントラストを決定するためのW3Cの仕様は、知覚的に均一ではなく、その結果、意味のない「コントラスト比」が作成されます。

...

we've found that the issue is not so much using "simple contrast" as it is the manner (or lack of) considering ambient lighting, the nature of illuminated displays, and/or a lack of math that better models human non-linear perception.

問題は「単純なコントラスト」を使用しているからというよりも、環境照明、ディスプレイの性質、および/または人間の非線形知覚をよりよくモデル化する数学が欠如しているからということがわかりました。

...

With a random set of colors, about 50% false passes and 22% false fails compared to a perceptually uniform prediction model such as SAPC.

ランダムな色の組を評価すると、SAPCのような知覚的に均一な予測モデルと比較して、約50%の偽合格と約22%の偽失敗が発生します。

...

The new methods are part of 3.0, as they are a complete break from the current methods. As such, discussing the current methods is somewhat moot — those are not going to change.

新しい手法は3.0の一部であり、現在の手法から完全に脱却したものです。このように、現在の手法を議論することはやや無意味です - それらは変更されないでしょう。

やはり、現状のコントラスト比の計算方法・推奨値は問題が多く当てにならないようだ。根本的に計算方法を変更する必要があるため3.0での更新を目指している模様。

開発中のツールも紹介されていて参考にはなるが、議論を斜め読みするだけでも相当複雑な問題領域であることが分かるので、現時点では実際のUIで実際のハードウェアで実際の使用環境において色々な人に見てもらって評価した結果を重視しよう、というのが私の結論。同じ配色でも、フォント・サイズ・ウェイトや文字の使われ方(本文かヘッダかボタンキャプションか)、ディスプレイの明るさや解像度によって妥当かどうかはものすごく変わる。

とりあえず、文字が白抜きの場合は太字にすること。