Re: [csswg-drafts] [css-color-6] Behavior of color-contrast() when no level is specified (#7556)

The CSS Working Group just discussed `[css-color-6] Behavior of color-contrast() when no level is specified`, and agreed to the following:

* `RESOLVED: no change`

<details><summary>The full IRC log of that discussion</summary>
&lt;lea> topic: [css-color-6] Behavior of color-contrast() when no level is specified<br>
&lt;emilio> github: https://github.com/w3c/csswg-drafts/issues/7556<br>
&lt;emilio> lea: r/n per spec if no level is specified (wcag()), behavior is to get the most contrasting color, vs if you provide a level (wcag(aa)) you get the first that passes<br>
&lt;emilio> ... I think that's a bit inconsistent, ignores preference order<br>
&lt;emilio> ... not sure what use cases it covers<br>
&lt;chris> q+<br>
&lt;emilio> ... and is inconsistent with general use of functional notations where if you omit something it defaults to something<br>
&lt;emilio> ... so basically magic<br>
&lt;emilio> fantasai: no magic<br>
&lt;emilio> lea: it's magic in the sense that there's no way to pass an argument to do the same<br>
&lt;fantasai> emilio: I think I agree, either choosing a reasonable default or making the level mandatory are both reasonable options<br>
&lt;fantasai> astearns: ...<br>
&lt;emilio> astearns: are the levels fixed?<br>
&lt;fantasai> emilio: they depend on the algorithm<br>
&lt;emilio> astearns: seems slightly better in the sense that if we add a level behavior doesn't change?<br>
&lt;astearns> ack chris<br>
&lt;emilio> TabAtkins: not really, if we're choosing a default. I prefer making it mandatory because the level depends on your use case. People might not understand them but at least it's affirmative action, not "I wrote the shortest thing"<br>
&lt;lea> q?<br>
&lt;astearns> ack fantasai<br>
&lt;lea> q+ to say that people with dyslexia actually find very high contrasting text *harder* to read<br>
&lt;emilio> chris: You increase contrast so that legibility improves and reading speed improves, up to a point, so there's an argument to be made that there's an optimal contrast<br>
&lt;emilio> fantasai: but optimal isn't gonna be any of the minimums that we have here<br>
&lt;emilio> ... I think the behavior of picking the max is reasonable, and if we want a keyword we can add it<br>
&lt;emilio> ... and there are use cases for having a bunch of colors and picking the best, and define what an optimum contrast is not feasible<br>
&lt;emilio> ... so I'd rather stick with the max behavior, and if we want a max keyword I won't object<br>
&lt;emilio> chris: I don't think you really responded to my point<br>
&lt;astearns> ack dbaron<br>
&lt;emilio> fantasai: if you have infinite colors to choose from I agree with you, but we're choosing between two or maybe three colors from the author<br>
&lt;emilio> miriam: does this mean that on this case we won't ever fall back to white / black/<br>
&lt;emilio> *?<br>
&lt;emilio> fantasai: yes<br>
&lt;emilio> emilio: if you don't specify any color you pick between white / black right?<br>
&lt;emilio> fantasai: yes, if there's any color you choose between them<br>
&lt;emilio> dbaron: I think we're discussing two things<br>
&lt;emilio> ... one is that the syntax is confusing because it switches between modes<br>
&lt;emilio> ... the other is that the other mode is not useful<br>
&lt;emilio> ... one way to fix the former might be to have two different functions<br>
&lt;emilio> fantasai: I'm not sure they're sufficiently different<br>
&lt;astearns> ack lea<br>
&lt;Zakim> lea, you wanted to say that people with dyslexia actually find very high contrasting text *harder* to read<br>
&lt;emilio> ... I'm fine adding a max keyword<br>
&lt;fantasai> s/different/different to warrant 2 different functions<br>
&lt;emilio> lea: people with dyslexia actually find very high contrasting text harder to read, so more contrast might not be better<br>
&lt;emilio> ... but as una has mentioned already, authors not always want the best contrast<br>
&lt;emilio> ... they have preferences<br>
&lt;emilio> ... also I don't think authors will provide only a couple colors, but will choose a span of colors<br>
&lt;emilio> ... also it was pointed out that this mode is a bit inconsistent when where you specify a level you can always fall back to white and back<br>
&lt;emilio> ... like if you have blue and dark blue<br>
&lt;emilio> fantasai: that might be what you want if your color is not for text<br>
&lt;emilio> q+<br>
&lt;emilio> lea: but I think that default is not reasonable<br>
&lt;astearns> ack fantasai<br>
&lt;lea> s/the best contrast/the highest contrast/<br>
&lt;emilio> fantasai: if the author doesn't want maximal contrast they should not pass white/black to the list, this default always chooses one of the provided colors, is easy to understand<br>
&lt;emilio> ... you might not want the maximum contrast, but wanting the maximum inside a set is reasonable<br>
&lt;emilio> ... and getting the first that passes the bar might not always be what you want<br>
&lt;florian> q+<br>
&lt;emilio> astearns: if we go with what's specced now that's a lot easier to understand than picking a level and find a reference, and see why you're getting a particular color<br>
&lt;fantasai> emilio: I think we're in agreement that the mode that fantasai describes is reasonable<br>
&lt;fantasai> emilio: there are use cases for that, nobody's disagreeing right?<br>
&lt;fantasai> emilio: the question is whether it should be the default<br>
&lt;lea> wcag2(max) sounds like it gets you the maximum wcag contrast (21). Perhaps it should be a preamble modifier<br>
&lt;fantasai> emilio: It's a bit weird that you pass an argument and it changes, maybe we pass the algorithm as a keyword rather than a function? But I guess some algos want parameters...<br>
&lt;astearns> ack florian<br>
&lt;astearns> ack emilio<br>
&lt;emilio> florian: agree with fantasai that it's useful. I think either this is the default mode when there's no threshold, or there's no default and you must specify a threshold or invoke the mode with a keyword<br>
&lt;emilio> ... having something else be the default feels very arbitrary and possibly wrong<br>
&lt;fantasai> +1<br>
&lt;emilio> emilio: agree<br>
&lt;emilio> lea: one thing I pointed out in irc is that if we make it a max argument looks like it gives you a maximum contrast (21) which you can always get with white and black<br>
&lt;emilio> ... should it make a different modifier?<br>
&lt;lea> RESOLVED: no change<br>
&lt;emilio> fantasai: I propose we keep it the default and if we find a good syntax for that we do that<br>
&lt;florian> s/that it's useful/that it's a useful behavior/<br>
&lt;RRSAgent> I have made the request to generate https://www.w3.org/2022/08/02-css-minutes.html dbaron<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7556#issuecomment-1203157557 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 2 August 2022 19:59:41 UTC