-
Notifications
You must be signed in to change notification settings - Fork 344
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
Coverage and Quality Report: Add reporting on use of forced-colors media query and currentcolor value #3024
Conversation
@mcking65 |
The ARIA Authoring Practices (APG) Task Force just discussed The full IRC log of that discussion<Jem> Topic:Quality report tracking of force-colors<Jem> https://github.com//pull/3024 <Jem> github:https://github.com//pull/3024 <dmontalvo> Matt_King: Is this removing information for force-colors? <Jem> preview page: https://deploy-preview-324--aria-practices.netlify.app/aria/apg/about/coverage-and-quality/ <dmontalvo> jongund: Just for SVG. I think in HTML force-color adjust is set <dmontalvo> ... I remember that for SVG elements we had to add this because the default was set to none, at least that's how the browsers dealt with it when we started <dmontalvo> Matt_King: Do you still think we shouldn't tracking it? <dmontalvo> jongund: We should be tracking force-colors media query and current color <dmontalvo> ... Force-colors won't work if force-color adjust is set to none <dmontalvo> ... I think that's something we are added to SVG because we are not ssure. I don't think it's something we need to track <dmontalvo> Matt_King: We are tracking the things that we want. We don't have to worry if force-color media query is used appropriately and we test it in high contrast mode <dmontalvo> ... We're going to need some reviewers <dmontalvo> Matt_King: It seems there is an empty file "aria-practices" created in your PRs <dmontalvo> Jem: I don't see that file <dmontalvo> jongund: I fixed it <dmontalvo> Matt_King: I think we need someone to review the JavaScript to ensure this is doing what it should <dmontalvo> Jem: This looks good, not sure how I can test this <dmontalvo> Matt_King: One way would be to do some searching of the code base <dmontalvo> jongund: In the current repo it does look at the example files, it does not matter whether it is SVG <dmontalvo> ... If it's a CSS file it loads it as text and looks through it <dmontalvo> Matt_King: There were only two examples when I looked at the preview <dmontalvo> ... According to this table we have exactly 50 examples <Jem> https://deploy-preview-324--aria-practices.netlify.app/aria/apg/about/coverage-and-quality/ <dmontalvo> Matt_King: Why are we tracking the CSS before and after in these columns? <Jem> we are looking at "graphics techniques" table <dmontalvo> jongund: Using the actual attribute was considered a best practice <dmontalvo> Matt_King: Mostly we don't talk about engineering as a practices <dmontalvo> jongund: Purpose is to identify examples that are using them in particular <dmontalvo> Matt_King: The aim is to look for places where we are missing something <dmontalvo> ... Where we are not doing it and should be doing it <dmontalvo> ... Maybe we need something like "missing", "needed", or the like <dmontalvo> jongund: Something like an aria-checked that is not using this technique? <dmontalvo> Matt_King: There is a certain technique that we need to make sure we use in each of the example if we are saying so <dmontalvo> ... If there are other legitimate ways to achieve the same thing, maybe we don't need it in the report <dmontalvo> Jem: CSS content information is important because it's related to the accessible name. I don't remember exatly how it's impacting accessibility <dmontalvo> jongund: If there's content it will be added to the accessible name <dmontalvo> ... But if the content is an image gotten from a URL then it gets ignored <dmontalvo> Matt_King: In the first example the content is blank, and in the other we have yes. It may make people wonder what this means <dmontalvo> ... This is out of scope for this agenda item, but we need to thing about approaches to check the quality of our code <dmontalvo> jongund: Not sure why we need to track those in particular <dmontalvo> ... I guess I could look for all the examples that use aria-checked, maybe aria-selected <dmontalvo> Matt_King: What about aria-pressed? <dmontalvo> jongund: Yes. <dmontalvo> Matt_King: We may want a column that is something like "state not triggered by CSS" or something <dmontalvo> jongund: I don't know if you can say you have to do it that way <dmontalvo> ... Whatever state you are susing an ARIA prperty, you should control the visual rendering <dmontalvo> ... It's not a requirement <dmontalvo> Matt_King: If we don't have a requirement to code it a specific way, then we probably don't need it in this report <dmontalvo> ... If we want to track consistency, maybe we do need it in the report <dmontalvo> Matt_King: Can you crete a new issue with the discussion we just had? <dmontalvo> s/Matt_King: /Jem: Matt_King, / <dmontalvo> Jem: I could create it an assign it to you Matt_King |
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.
scripts/coverage-report.js
Outdated
@@ -521,7 +521,9 @@ glob | |||
contentCSS: getNumberOfReferences(dataCSS, 'content'), | |||
beforeCSS: getNumberOfReferences(dataCSS, '::before'), | |||
afterCSS: getNumberOfReferences(dataCSS, '::after'), | |||
forcedColorAdjust: getNumberOfReferences(dataCSS, 'forced-color-adjust'), | |||
// forcedColorAdjust: getNumberOfReferences(dataCSS, 'forced-color-adjust'), |
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.
Could this be removed instead of commenting out?
scripts/coverage-report.js
Outdated
$('#example_summary_force_color').html(countForcedColorAdjust); | ||
$('#example_summary_force_colors').html(countForcedColors); | ||
$('#example_summary_current_color').html(countCurrentColor); | ||
// $('#example_summary_force_color_adjust').html(countForcedColorAdjust); |
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 question as above
<!-- | ||
<tr> | ||
<th scope="row">Uses <code>forced-color-adjust</code> in CSS/SVG</th> | ||
<td id="example_summary_force_color_adjust"></td> | ||
</tr> | ||
--> |
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 question as above
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 will take it out
@mcking65 |
@howard-e I assume that is why the preview still shows the CSS columns Jon removed from the graphics techniques table; the generation script didn't run? I requested re-review now that Jon has made requested updates. |
This PR needs to manually re-run But it is odd that the generating scripts weren’t being captured so I submitted #3048 to address it.
Not exactly, this was because there was an invalid file read happening with the new experimental content support on the build repo because of an uncaught assumption that the newly created files in #2977 were already present when the build repo references w3c/aria-practices. Already submitted w3c/wai-aria-practices#330 to fix and has been merged and and Jon’s PR preview has been regenerated
Will check it! |
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.
… script update (#3048) Related to PR #3024 Without this change, using lint-staged, the npm run reference-tables and npm run coverage-report scripts are automatically ran when a git commit happens ONLY if files matching content/patterns/**/examples/*.html have been changed. The generating scripts have been overlooked in that automatic process. This PR triggers the process when adds scripts/coverage-report.* and scripts/reference-tables.* are changed. This should reduce failures of the Check examples/index.html / coverage check if only those script files have been updated in a PR.
The pull request updates the coverage script to:
forced-color-adjust
from the report, since I thin we should not even be using it anymore in examples.forced-colors
media query.currentcolor
value for CSS properties that support color values.Preview of Updated Coverage Report
WAI Preview Link (Last built on Tue, 23 Jul 2024 06:01:44 GMT).