From e19ea9f833a313ebd6ea35a295ed88dd25a1f759 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Mon, 1 Jul 2024 23:17:50 +0100 Subject: [PATCH] HTML Reporter: Change `#qunit-banner` from H2 to DIV 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 https://github.com/qunitjs/qunit/issues/1427. --- docs/browser.md | 2 +- src/reporters/HtmlReporter.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/browser.md b/docs/browser.md index f1f1305eb..c33073735 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -203,7 +203,7 @@ QUnit 1.x, 2.x: ```html

-

+

diff --git a/src/reporters/HtmlReporter.js b/src/reporters/HtmlReporter.js index c8208bcf5..0b9678262 100644 --- a/src/reporters/HtmlReporter.js +++ b/src/reporters/HtmlReporter.js @@ -666,7 +666,7 @@ export default class HtmlReporter { // contains id="qunit". qunit.innerHTML = "

" + escapeText(document.title) + '

' + - "

" + + "
" + "" + this.appendFilteredTest() + "

" +