-
Notifications
You must be signed in to change notification settings - Fork 34
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
MARK AS DEPRECATED and LINK TO CURRENT #570
Conversation
MARK AS DEPRECIATED and LINK TO CURRENT WCAG 3 DRAFT. This page contains obsolete code that is still hitting high in Google searches, and the result is that obsolete code is being used for APCA. This MUST be corrected ASAP!!! This PR marks as depreciated and makes certain minor other corrections that should have been applied last year as well.
Hi Michael, The It is really important that this document, which is widely linked to, be updated per THIS pull request, or alternately pull request #213 (which I issued over a year ago, and no action was ever taken) or alternately #568. Honestly, I do not care which of the three are used, this one addresses all of Jeanne's @jspellman exceptions she mentioned in #213 and #568 . This request #570 was created at her request to a branch she created for the purpose. What do I need to do to expedite this please?This is a serious problem and it is costing me significant wasted time and effort tracking down all the cases of incorrect usage of the incorrect code that was never intended to be public facing, and should have been replaced by the corrected code for the FPWD, which was deleted despite my objections.The old code that is being improperly used ranks highly in Google with link The material relating to APCA on the above link is NOT AUTHORIZED for public use.This pull request corrects this problem with some simple changes such as adding a DEPRECATED warning banner and adds links to the current WCAG 3 draft. Thank you Andy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Myndex — Disclaimer, right up front: I have no affiliation with the w3c in any way.
But in the interest of possibly helping move this forward, I noted a bunch of small tweaks for this PR. Hopefully my input will be viewed as helpful, rather than disruptive — but if not, please disregard with my apologies for the unnecessary traffic.
I've tried to provide a suggested change wherever possible. That way, you can incorporate any edit(s) you concur with into your PR with just a click.
///// | ||
///// https://www.w3.org/TR/wcag-3.0/ | ||
///// | ||
///// APCA GITHUB: https://github.com/Myndex/apca-w3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be useful to link to a specific replacement file, rather than just "see this GitHub repo"? Since this is code for a specific purpose.
In theory that could even allow this outdated code to be removed, and replaced with just the link. (Though I don't have any knowledge of the policies regarding Silver, and whether links to external content unmaintained by them are considered acceptable resources. In theory, any file (or repo) linked externally could be changed at any point — potentially even without your knowledge, in the case of account compromise / malicious hacking — to something wholly inappropriate.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I tried that initially with pull request #213 though that was over a year ago, so I tried these newer requests that mark as deprecated, and replace the constants with the ones that should have been replaced back in 2020...
const sRGBtrc = 2.218; // Gamma for sRGB linearization. 2.223 could be used instead | ||
// 2.218 sets unity with the piecewise sRGB at #777 | ||
const sRGBtrc = 2.4; // Gamma for sRGB linearization. 2.35 could be used instead | ||
// 2.4 emulates common monitor perceived EOTF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies if I just missed it, but is EOTF defined anywhere? It feels a big jargony here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Electro-Optical Transfer Function. It is a standard term.
@@ -197,7 +208,7 @@ <h3>Example Code for a Test Tool</h3> | |||
var Ybg = Rbg*Rco + Gbg*Gco + Bbg*Bco; | |||
var Ytxt = Rtxt*Rco + Gtxt*Gco + Btxt*Bco; | |||
|
|||
///// INSERT COLOR MODULE HERE ///// | |||
///// DEPRECATED or OBSOLETE - DO NOT USE | |||
|
|||
// Now, determine polarity, soft clamp black, and calculate contrast | |||
// Finally scale for easy to remember percentages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still says "percentages" but they aren't anymore, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct... but I wasn't trying ti revise everything, just the "big chunks"
} | ||
|
||
// If SAPC's more than 15%, return that value, otherwise clamp to zero | ||
// If SAPC's more than Lc 15, return that value, otherwise clamp to zero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// If SAPC's more than Lc 15, return that value, otherwise clamp to zero | |
// If SAPC is more than Lc 15, return that value, otherwise clamp to zero |
|
||
} else { ///// For reverse polarity, white text on black | ||
|
||
Ybg = (Ybg > blkThrs) ? Ybg : Ybg + Math.abs(Ybg - blkThrs) ** blkClmp; | ||
SAPC = ( Ybg ** revBGExp - Ytxt ** revTXTExp ) * scaleWoB; | ||
|
||
return (SAPC > -15 ) ? "0%" : SAPC.toPrecision(3) + "%"; | ||
return (SAPC > -15 ) ? "0" : SAPC.toPrecision(3) + "Lc"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
APCA = ( Y<sub>bg</sub> ^ normBGExp - Y<sub>txt</sub> ^ normTXTExp ) * 161.8; | ||
return (APCA < 15 ) ? "0%" : str(APCA) + "%"; | ||
APCA = ( Y<sub>bg</sub> ^ normBGExp - Y<sub>txt</sub> ^ normTXTExp ) * 114.0 - 2.7; | ||
return (APCA < 15 ) ? "0" : str(APCA) + "Lc"; | ||
} else { | ||
Y<sub>bg</sub>g = (Y<sub>bg</sub> > blkThrs) ? Y<sub>bg</sub> : Y<sub>bg</sub> + abs(Y<sub>bg</sub> - blkThrs) ^ blkClmp; | ||
APCA = ( Y<sub>bg</sub> ^ revBGExp - Y<sub>txt</sub> ^ revTXTExp ) * 161.8; | ||
return (APCA > -15 ) ? "0%" : str(APCA) + "%"; | ||
} | ||
APCA = ( Y<sub>bg</sub> ^ revBGExp - Y<sub>txt</sub> ^ revTXTExp ) * 114.0 + 2.7; | ||
return (APCA > -15 ) ? "0" : str(APCA) + "Lc"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same concern here, about returning strings like "-20Lc" or "-15.4Lc".
</ol> | ||
<h3>Accessible Contrast by Font Size and Weight</h3> | ||
<p>Directions: | ||
<ul> | ||
<li>Cross index nominal font size (in CSS px) to CSS weight. | ||
<li>APCA Contrast Percentage must meet or exceed the value listed. | ||
<li>For light text on a dark background the APCA tool will show a negative percentage. Simply use the absolute (positive) value. For example, if the APCA value is -58%, use 58%. | ||
<li>A <span class="do-not">⊘</span> indicates that a larger font size (or heavier font weight) must be used. | ||
<li>A <span class="underWeight">⊘</span> indicates that a larger font size (or heavier font weight) must be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see that this CSS class is either defined or actually used anywhere else; it seems as though do-not
is still correct (producing a red 🚫 when applied to ⊘
). Or am I missing something?
<li>A <span class="underWeight">⊘</span> indicates that a larger font size (or heavier font weight) must be used. | |
<li>A <span class="do-not">⊘</span> indicates that a larger font size (or heavier font weight) must be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... the more recent CSS class is .underweight but not super important here either way given context.
Hi @ferdnyc
Not disruptive at all, and thank you Frank... I had dashed this out in some what of a hurry, as the third attempt to get this corrected. I agree with all your suggestions. The most amusing for me at least is how I have used "depreciated" instead of "deprecated" for the last, oh, 45 years or so 😳 ... Patrick Lauke pointed this out to me last month, LOL... "dyslexia I haz it" Still not sure though why the build validate Action isn't working on this PR… Thank you for your help Andy |
The word depreciated isn't wrong, and is closer to plain language. I have only ever heard deprecated used in the context of standards development. I often feel like the better word is obsolete, and that would have been okay in this particular case, but I think I understand the reluctance to use it. |
At the risk of going all Language Log on this, "deprecate" is favored in this kind of context largely because it's not common language. As a jargon term not otherwise in common use, it's easier to impose a concrete definition that everyone can agree on. Also, as generally understood "depreciate" is a somewhat-subjective evaluation, whereas "deprecate" is an declarative statement from a position of authority. People can quibble over the current value of various technologies, practices, etc., how it's changed over time, and whether or to what extent those things are still relevant/useful/valuable. But when you — as the authority on a standard, interface, or API — declare some part of that thing "deprecated"... well, for starters, it's true and correct by definition. Literally, it becomes part of the new definition for the thing which you are responsible for defining in the first place. Whether or not others still perceive any loss in value/relevance, you're stating that it is no longer defined as part of the available components of the system, is only being retained to support existing users, and is not intended to be used in any new applications of the system. Those who currently make use of it are urged to eliminate those dependencies as soon as possible, and anyone adding new uses of the deprecated components must be aware that they are working outside the current system parameters and will not be supported in their efforts. Sometimes that decision is made due to depreciation of the original design. But other times it's made with intent to force the issue of adopting a newer approach. Sometimes the declaration is even made capriciously, targeting a system which has in no way depreciated in value to the majority of users. In those cases, the deprecation decision is subject to possible reversal — either by appeals to authority, which convince them to rescind their declaration, or by forking the project into the hands of new authoritative decision-makers who then declare the earlier status quo restored. Both useful words, but (despite their very close proximity, linguistically) also very different. "Obsolete" has many of the same connotations as "depreciate" — it's an evaluation, and a somewhat subjective one at that. There's room to debate something's obsolescence, but that may or may not have any bearing on a decision to deprecate. (That depends on whether or not the decision-makers choose to consider it.) |
Hey folks, what is the status on this PR? I'm trying to get a sense of what exactly WCAG 3.0 specifies for text contrast, which seems to be very little, and am also finding links to old/orphaned resources like this one This PR seems to be the more recent one than #213, sorry to comment on both but they are both open. Actually normatively referencing or including the various constants used in the APCA algorithm would make things much easier. But at minimum, removing obsolete code versions would help clarity greatly. |
Hi Chris @svgeesus
Yes, this is a problem going on for over a year and a half (PR 213) and I was told more recently that the obsolete (alpha-level) resources (that never should have been publicly referenced or linked to) were to be deleted, yet still have not been, nor have they been marked as "deprecated". This is the source of the incorrect versions in the wild that have resulted in a waste of my time trying to track down. Why the alpha code is still up here is unknown, and I consider the lack of action here to be obstructionist as a form of intentional interference with the public beta testing that is currently underway. |
FWIW, I have seen reason to believe the delay to be intentional. There are quite a number of new and different working processes (and tools) associated with gearing up for WCAG3. |
Hi Chris, Bruce, @svgeesus @bruce-usab I added an SVG and MathML to the pending PR #630 , of the base equation including the constants (0.0.98G-4d) as have been in place since Feb 15th, 2021. Chris thank you for bring it to my attention regarding clarity here. This PR #570 OR #213 still needs to be merged, as there is still people linking to this bad obsolete material, and putting it into apps. This is beyond bad. |
I'm seeing a lot of recent edits on Silver, including merging PRs so if there was a hold-up in the past, it seems to have been resolved. |
Ping on status. I have meantime reviewed the PR, made change suggestions, which have all been addressed. @jspellman @michael-n-cooper is there a hold on merging PRs? |
Yes, deprecated is the correct term Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems generally good, but resolve questions posed by @ferdnyc
const sRGBtrc = 2.218; // Gamma for sRGB linearization. 2.223 could be used instead | ||
// 2.218 sets unity with the piecewise sRGB at #777 | ||
const sRGBtrc = 2.4; // Gamma for sRGB linearization. 2.35 could be used instead | ||
// 2.4 emulates common monitor perceived EOTF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Electro-Optical Transfer Function. It is a standard term.
OBE by #663 |
MARK AS DEPRECATED or obsolete and link to current WCAG 3 draft and current code, etc. etc.
This page contains obsolete code that is still hitting high in Google searches, and the result is that obsolete code is being used for APCA. This MUST be corrected ASAP!!! This PR marks the page as depreciated and makes certain minor other corrections that should have been applied last year as well. And importantly, links to the current WCAG 3 draft, and the current code repository.
This is essentially the same as PR #568 which also replaced #213 adding in some adjustments requested by Jeanne.
Thank you,
Andy