-
Notifications
You must be signed in to change notification settings - Fork 783
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
HTML Report should meet WCAG compliance #1427
Comments
Thanks for the report. I definitely agree that this should be fixed. |
(Merged from #1469) When scanning the default example at https://qunitjs.com/resources/example-index.html with the AXE tool in Firefox, there are a couple of issues detected currently. (Thanks to @zachleat for including these in Speedlify. We looked at similar tools in the past, but it's been years, and a ton of low-hanging fruit has crept in.)
Most of these seem easy to fix:
|
Tweak our colors away from the semi-greyish colors we had before, toward more dark/saturated or bright colors. Also reduce the overall number of distinct colors, reusing the same ones more often. * Change most uses of black (`#000000`) to `#0D3349`, which is the very dark blue we already used for the `#qunit-header` background. * Change the text color for `#qunit-testresult` from `#2B81AF` to that same very dark blue `#0D3349`. The text color previously used here was a medium blue that we didn't use for any other text. * Change text in `#qunit .pass` from `#528CE0` to `#2F68DA`, this is more saturated and appears darker. I also moved its hue slightly from cyan-blue, more toward blue-violet. * Change the Rerun link from the near-invisible `#C2CCD1` to instead inherit the text color of `#qunit .pass` or ``#qunit .fail`, e.g. `#2F68DA`. Also, to make it still stand out as special, add an underline. It retains its liberal padding for easy clickability. Clean up: * Remove unused color value for `#qunit-header`. Instead set it to that of `#qunit-header a` (it only contains a link), and let the latter inherit this color. * Replace redundant `#qunit-tests .fail .test-name` and and `#qunit-tests .fail .module-name ` styles. Ref qunitjs#1427.
Tweak our colors away from the semi-greyish colors we had before, toward more dark/saturated or bright colors. Also reduce the overall number of distinct colors, reusing the same ones more often. * Change most uses of black (`#000000`) to `#0D3349`, which is the very dark blue we already used for the `#qunit-header` background. * Change the text color for `#qunit-testresult` from `#2B81AF` to that same very dark blue `#0D3349`. The text color previously used here was a medium blue that we didn't use for any other text. * Change text in `#qunit .pass` from `#528CE0` to `#2F68DA`, this is more saturated and appears darker. I also moved its hue slightly from cyan-blue, more toward blue-violet. * Change the Rerun link from the near-invisible `#C2CCD1` to instead inherit the text color of `#qunit .pass` or `#qunit .fail`, e.g. `#2F68DA`. Also, to make it still stand out as special, add an underline. It retains its liberal padding for easy clickability. Clean up: * Remove unused color value for `#qunit-header`. Instead set it to that of `#qunit-header a` (it only contains a link), and let the latter inherit this color. * Replace redundant `#qunit-tests .fail .test-name` and and `#qunit-tests .fail .module-name ` styles. Ref qunitjs#1427.
Tweak our colors away from the semi-greyish colors we had before, toward more dark/saturated or bright colors. Also reduce the overall number of distinct colors, reusing the same ones more often. * Change most uses of black (`#000000`) to `#0D3349`, which is the very dark blue we already used for the `#qunit-header` background. * Change text in `#qunit .pass` from `#528CE0` to `#2F68DA`, this is more saturated and appears darker. I also moved its hue slightly from cyan-blue, more toward blue-violet. * Change the text color for `#qunit-testresult` from `#3B81AF` to the same dark blue as used for module names, `#366097`. The color previously used here was a medium blue that we didn't use for any other text. * Change the Rerun link from the near-invisible `#C2CCD1` to instead inherit the text color of `#qunit .pass` or `#qunit .fail`, e.g. `#2F68DA`. Also, to make it still stand out as special, add an underline. It retains its liberal padding for easy clickability. Clean up: * Remove unused color value for `#qunit-header`. Instead set it to that of `#qunit-header a` (it only contains a link), and let the latter inherit this color. * Replace redundant `#qunit-tests .fail .test-name` and and `#qunit-tests .fail .module-name ` styles. Ref qunitjs#1427.
Tweak our colors away from the semi-greyish colors we had before, toward more dark/saturated or bright colors. Also reduce the overall number of distinct colors, reusing the same ones more often. * Change most uses of black (`#000000`) to `#0D3349`, which is the very dark blue we already used for the `#qunit-header` background. * Change text in `#qunit .pass` from `#528CE0` to `#2F68DA`, this is more saturated and appears darker. I also moved its hue slightly from cyan-blue, more toward blue-violet. * Change the text color for `#qunit-testresult` from `#3B81AF` to the same dark blue as used for module names, `#366097`. The color previously used here was a medium blue that we didn't use for any other text. * Change the Rerun link from the near-invisible `#C2CCD1` to instead inherit the text color of `#qunit .pass` or `#qunit .fail`, e.g. `#2F68DA`. Also, to make it still stand out as special, add an underline. It retains its liberal padding for easy clickability. Clean up: * Remove unused color value for `#qunit-header`. Instead set it to that of `#qunit-header a` (it only contains a link), and let the latter inherit this color. * Replace redundant `#qunit-tests .fail .test-name` and and `#qunit-tests .fail .module-name ` styles. Ref qunitjs#1427.
Tweak our colors away from the semi-greyish colors we had before, toward more dark/saturated or bright colors. Also reduce the overall number of distinct colors, reusing the same ones more often. * Change most uses of black (`#000000`) to `#0D3349`, which is the very dark blue we already used for the `#qunit-header` background. * Change text in `#qunit .pass` from `#528CE0` to `#2F68DA`, this is more saturated and appears darker. I also moved its hue slightly from cyan-blue, more toward blue-violet. * Change the text color for `#qunit-testresult` from `#3B81AF` to the same dark blue as used for module names, `#366097`. The color previously used here was a medium blue that we didn't use for any other text. * Change the Rerun link from the near-invisible `#C2CCD1` to instead inherit the text color of `#qunit .pass` or `#qunit .fail`, e.g. `#2F68DA`. Also, to make it still stand out as special, add an underline. It retains its liberal padding for easy clickability. Clean up: * Remove unused color value for `#qunit-header`. Instead set it to that of `#qunit-header a` (it only contains a link), and let the latter inherit this color. * Replace redundant `#qunit-tests .fail .test-name` and and `#qunit-tests .fail .module-name ` styles. Ref qunitjs#1427.
Tweak our colors away from the semi-greyish colors we had before, toward more dark/saturated or bright colors. Also reduce the overall number of distinct colors, reusing the same ones more often. * Change most uses of black (`#000000`) to `#0D3349`, which is the very dark blue we already used for the `#qunit-header` background. * Change text in `#qunit .pass` from `#528CE0` to `#2F68DA`, this is more saturated and appears darker. I also moved its hue slightly from cyan-blue, more toward blue-violet. * Change the text color for `#qunit-testresult` from `#3B81AF` to the same dark blue as used for module names, `#366097`. The color previously used here was a medium blue that we didn't use for any other text. * Change the Rerun link from the near-invisible `#C2CCD1` to instead inherit the text color of `#qunit .pass` or `#qunit .fail`, e.g. `#2F68DA`. Also, to make it still stand out as special, add an underline. It retains its liberal padding for easy clickability. Clean up: * Remove unused color value for `#qunit-header`. Instead set it to that of `#qunit-header a` (it only contains a link), and let the latter inherit this color. * Replace redundant `#qunit-tests .fail .test-name` and and `#qunit-tests .fail .module-name ` styles. Ref #1427.
All points but one have been resolved and will be released shortly. The remaining point (H2 -> DIV, for the empty pixel banner) will be done in QUnit 3. |
There is no need for this presentational pixel bar to be a heading element. It is completely a presentational thing that is better represented with a DIV instead. This previously produced the following accessiblity warning, e.g. in Firefox's Accessibility inspector, or in Chrome with AXE. > Headings must not be labeled. > > `Role: heading. "" [text label]` > > https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_WCAG/Text_labels_and_names > Headings must not be empty. > > https://github.com/dequelabs/axe-core/blob/v4.9.1/doc/rule-descriptions.md > https://act-rules.github.io/rules/ffd0e9 Fixes #1427.
We'd like to use a tool like Axe to help lockdown WCAG rules for accessibility, but the QUnit page itself has some violations that we are forced to filter out. Ideally, yes, tests would only attempt to lockdown their particular widget/section, likely placed in the qunit-fixture, but this shouldn't be a limitation.
Aside from our specific intent, meeting these guidelines can independently benefit testing workflows with increased industry-standard accessibility.
Code that reproduces the problem:
What did you expect to happen?
No violations to be found
What actually happened?
This currently finds 3 violations, failing the following rules:
Checklist
See #1427 (comment)
The text was updated successfully, but these errors were encountered: