From b9eab0752442e9f5791d87b907f73a92314f6c34 Mon Sep 17 00:00:00 2001 From: Gabe Olesen Date: Fri, 3 Sep 2021 13:56:55 +0100 Subject: [PATCH 1/8] draft --- lib/checks/navigation/p-as-heading-evaluate.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/checks/navigation/p-as-heading-evaluate.js b/lib/checks/navigation/p-as-heading-evaluate.js index 61a9a1f3d1..e2974c4684 100644 --- a/lib/checks/navigation/p-as-heading-evaluate.js +++ b/lib/checks/navigation/p-as-heading-evaluate.js @@ -79,6 +79,14 @@ function pAsHeadingEvaluate(node, options, virtualNode) { const nextStyle = nextSibling ? getStyleValues(nextSibling) : null; const prevStyle = prevSibling ? getStyleValues(prevSibling) : null; + if (node && nextSibling) { + // If the heading is longer than the paragraph, we pass it. - DONE + if ( + node.textContent.trim().length > nextSibling.textContent.trim().length + ) { + return true; + } + } if (!nextStyle || !isHeaderStyle(currStyle, nextStyle, margins)) { return true; } From 344ec0c380e2aeaba50abfdda614d217f5f8a761 Mon Sep 17 00:00:00 2001 From: Gabe Olesen Date: Mon, 13 Sep 2021 18:06:25 +0100 Subject: [PATCH 2/8] another check for text length and tests --- .../navigation/p-as-heading-evaluate.js | 8 ++++++- test/checks/navigation/p-as-heading.js | 21 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/lib/checks/navigation/p-as-heading-evaluate.js b/lib/checks/navigation/p-as-heading-evaluate.js index e2974c4684..ee7f38ab4a 100644 --- a/lib/checks/navigation/p-as-heading-evaluate.js +++ b/lib/checks/navigation/p-as-heading-evaluate.js @@ -80,13 +80,19 @@ function pAsHeadingEvaluate(node, options, virtualNode) { const prevStyle = prevSibling ? getStyleValues(prevSibling) : null; if (node && nextSibling) { - // If the heading is longer than the paragraph, we pass it. - DONE if ( node.textContent.trim().length > nextSibling.textContent.trim().length ) { return true; } + if ( + node.textContent.trim().length * 2 < + nextSibling.textContent.trim().length + ) { + return undefined; + } } + if (!nextStyle || !isHeaderStyle(currStyle, nextStyle, margins)) { return true; } diff --git a/test/checks/navigation/p-as-heading.js b/test/checks/navigation/p-as-heading.js index 97d1fde38b..2ec9e81601 100644 --- a/test/checks/navigation/p-as-heading.js +++ b/test/checks/navigation/p-as-heading.js @@ -243,6 +243,27 @@ describe('p-as-heading', function() { }); }); + it('returns true if the possible heading is longer than the supposed paragraph', function() { + var params = checkSetup( + '

The size of possible headling is longer than supposed paragraph

' + + '

maybe

', + testOptions + ); + assert.isTrue( + axe.testUtils.getCheckEvaluate('p-as-heading').apply(checkContext, params) + ); + }); + + it('returns undefined if the heading is less than twice as long', function() { + var params = checkSetup( + '

heading

' + '

headingheadings

', + testOptions + ); + assert.isUndefined( + axe.testUtils.getCheckEvaluate('p-as-heading').apply(checkContext, params) + ); + }); + (shadowSupported ? it : xit)( 'returns undefined instead of false if the element is inside a blockquote in light dom', function() { From cfe5edd8a2f5be85445e7ca132753239de83db64 Mon Sep 17 00:00:00 2001 From: Gabe Olesen Date: Mon, 20 Sep 2021 16:12:38 +0100 Subject: [PATCH 3/8] implement verified changes without options --- .../navigation/p-as-heading-evaluate.js | 16 ++++---- test/checks/navigation/p-as-heading.js | 41 +++++++++---------- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/lib/checks/navigation/p-as-heading-evaluate.js b/lib/checks/navigation/p-as-heading-evaluate.js index ee7f38ab4a..a48ac0fa7f 100644 --- a/lib/checks/navigation/p-as-heading-evaluate.js +++ b/lib/checks/navigation/p-as-heading-evaluate.js @@ -80,16 +80,14 @@ function pAsHeadingEvaluate(node, options, virtualNode) { const prevStyle = prevSibling ? getStyleValues(prevSibling) : null; if (node && nextSibling) { - if ( - node.textContent.trim().length > nextSibling.textContent.trim().length - ) { + const headingLength = node.textContent.trim().length; + const paragraphLength = nextSibling.textContent.trim().length; + if (headingLength > paragraphLength) { return true; - } - if ( - node.textContent.trim().length * 2 < - nextSibling.textContent.trim().length - ) { - return undefined; + } else if (headingLength < paragraphLength / 2) { + return false; + } else { + undefined; } } diff --git a/test/checks/navigation/p-as-heading.js b/test/checks/navigation/p-as-heading.js index 2ec9e81601..712630a56e 100644 --- a/test/checks/navigation/p-as-heading.js +++ b/test/checks/navigation/p-as-heading.js @@ -141,6 +141,26 @@ describe('p-as-heading', function() { ); }); + it('returns true if the heading elm length is greater than the paragraph elm', function() { + var params = checkSetup( + '

elm1elm1

' + '

elm2

', + testOptions + ); + assert.isTrue( + axe.testUtils.getCheckEvaluate('p-as-heading').apply(checkContext, params) + ); + }); + + it('returns false if the heading is 200% shorter than the paragraph ', function() { + var params = checkSetup( + '

el1

' + '

elm2elm2

', + testOptions + ); + assert.isFalse( + axe.testUtils.getCheckEvaluate('p-as-heading').apply(checkContext, params) + ); + }); + describe('option.margin', function() { it('passes if no margins are set', function() { var options = {}; @@ -243,27 +263,6 @@ describe('p-as-heading', function() { }); }); - it('returns true if the possible heading is longer than the supposed paragraph', function() { - var params = checkSetup( - '

The size of possible headling is longer than supposed paragraph

' + - '

maybe

', - testOptions - ); - assert.isTrue( - axe.testUtils.getCheckEvaluate('p-as-heading').apply(checkContext, params) - ); - }); - - it('returns undefined if the heading is less than twice as long', function() { - var params = checkSetup( - '

heading

' + '

headingheadings

', - testOptions - ); - assert.isUndefined( - axe.testUtils.getCheckEvaluate('p-as-heading').apply(checkContext, params) - ); - }); - (shadowSupported ? it : xit)( 'returns undefined instead of false if the element is inside a blockquote in light dom', function() { From 301b08206dd2c0cb80544c2062c9df6b414a09d9 Mon Sep 17 00:00:00 2001 From: Gabe Olesen Date: Tue, 28 Sep 2021 15:21:41 +0100 Subject: [PATCH 4/8] add options check, changes and tests --- doc/rule-descriptions.md | 2 +- .../navigation/p-as-heading-evaluate.js | 14 ++-- lib/checks/navigation/p-as-heading.json | 9 ++- test/checks/navigation/p-as-heading.js | 64 ++++++++++++++++++- 4 files changed, 81 insertions(+), 8 deletions(-) diff --git a/doc/rule-descriptions.md b/doc/rule-descriptions.md index 372def1e2b..e145658a76 100644 --- a/doc/rule-descriptions.md +++ b/doc/rule-descriptions.md @@ -124,7 +124,7 @@ Rules we are still testing and developing. They are not enabled by default in ax | [label-content-name-mismatch](https://dequeuniversity.com/rules/axe/4.3/label-content-name-mismatch?application=RuleDescription) | Ensures that elements labelled through their content must have their visible text as part of their accessible name | Serious | cat.semantics, wcag21a, wcag253, experimental | failure | [2ee8b8](https://act-rules.github.io/rules/2ee8b8) | | [link-in-text-block](https://dequeuniversity.com/rules/axe/4.3/link-in-text-block?application=RuleDescription) | Links can be distinguished without relying on color | Serious | cat.color, experimental, wcag2a, wcag141 | failure, needs review | | | [no-autoplay-audio](https://dequeuniversity.com/rules/axe/4.3/no-autoplay-audio?application=RuleDescription) | Ensures <video> or <audio> elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio | Moderate | cat.time-and-media, wcag2a, wcag142, experimental | failure, needs review | [80f0bf](https://act-rules.github.io/rules/80f0bf) | -| [p-as-heading](https://dequeuniversity.com/rules/axe/4.3/p-as-heading?application=RuleDescription) | Ensure p elements are not used to style headings | Serious | cat.semantics, wcag2a, wcag131, experimental | failure | | +| [p-as-heading](https://dequeuniversity.com/rules/axe/4.3/p-as-heading?application=RuleDescription) | Ensure p elements are not used to style headings | Serious | cat.semantics, wcag2a, wcag131, experimental | failure, needs review | | | [table-fake-caption](https://dequeuniversity.com/rules/axe/4.3/table-fake-caption?application=RuleDescription) | Ensure that tables with a caption use the <caption> element. | Serious | cat.tables, experimental, wcag2a, wcag131, section508, section508.22.g | failure | | | [td-has-header](https://dequeuniversity.com/rules/axe/4.3/td-has-header?application=RuleDescription) | Ensure that each non-empty data cell in a large table has one or more table headers | Critical | cat.tables, experimental, wcag2a, wcag131, section508, section508.22.g | failure | | diff --git a/lib/checks/navigation/p-as-heading-evaluate.js b/lib/checks/navigation/p-as-heading-evaluate.js index a48ac0fa7f..7cd0834fe1 100644 --- a/lib/checks/navigation/p-as-heading-evaluate.js +++ b/lib/checks/navigation/p-as-heading-evaluate.js @@ -80,14 +80,20 @@ function pAsHeadingEvaluate(node, options, virtualNode) { const prevStyle = prevSibling ? getStyleValues(prevSibling) : null; if (node && nextSibling) { - const headingLength = node.textContent.trim().length; - const paragraphLength = nextSibling.textContent.trim().length; + const optionsHeadingLength = options.lengthThreshold.headingLength || []; + const optionsParagraphLength = + options.lengthThreshold.paragraphLength || []; + + const headingLength = node.textContent.trim().length * optionsHeadingLength; + const paragraphLength = + nextSibling.textContent.trim().length * optionsParagraphLength; + if (headingLength > paragraphLength) { return true; } else if (headingLength < paragraphLength / 2) { return false; - } else { - undefined; + } else if (headingLength < paragraphLength) { + return undefined; } } diff --git a/lib/checks/navigation/p-as-heading.json b/lib/checks/navigation/p-as-heading.json index 38272045c6..5647b3b5a9 100644 --- a/lib/checks/navigation/p-as-heading.json +++ b/lib/checks/navigation/p-as-heading.json @@ -18,13 +18,18 @@ { "size": 1.4 } - ] + ], + "lengthThreshold": { + "headingLength": ["1"], + "paragraphLength": ["1"] + } }, "metadata": { "impact": "serious", "messages": { "pass": "

elements are not styled as headings", - "fail": "Heading elements should be used instead of styled p elements" + "fail": "Heading elements should be used instead of styled

elements", + "incomplete": "Unable to determine if

elements are styled as headings" } } } diff --git a/test/checks/navigation/p-as-heading.js b/test/checks/navigation/p-as-heading.js index 712630a56e..7bcdf8ad59 100644 --- a/test/checks/navigation/p-as-heading.js +++ b/test/checks/navigation/p-as-heading.js @@ -153,7 +153,7 @@ describe('p-as-heading', function() { it('returns false if the heading is 200% shorter than the paragraph ', function() { var params = checkSetup( - '

el1

' + '

elm2elm2

', + '

el1

' + '

elm2elm2

', testOptions ); assert.isFalse( @@ -161,6 +161,68 @@ describe('p-as-heading', function() { ); }); + it('returns undefined if the heading is twice as long but not greater than the length of the pararaph ', function() { + var params = checkSetup( + '

elel

' + '

elm2elm2

', + testOptions + ); + assert.isUndefined( + axe.testUtils.getCheckEvaluate('p-as-heading').apply(checkContext, params) + ); + }); + describe('options.lengthThreshold', function() { + it('returns true when options.lengthThreshold.headingLength is greater than the paragraph', function() { + var options = { + lengthThreshold: { + headingLength: ['3'] + } + }; + var params = checkSetup( + '

elm2

' + '

elm2elm2/p>', + options + ); + assert.isTrue( + axe.testUtils + .getCheckEvaluate('p-as-heading') + .apply(checkContext, params) + ); + }); + + it('returns false when options.lengthThreshold.headingLength 200% shorter than the paragraph', function() { + var options = { + lengthThreshold: { + headingLength: ['2'] + } + }; + var params = checkSetup( + '

el

' + '

elm2elm2elm2elm2

', + options + ); + assert.isFalse( + axe.testUtils + .getCheckEvaluate('p-as-heading') + .apply(checkContext, params) + ); + }); + + it('returns undefined when options.lengthThreshold.headingLength is twice as long but not greater than the paragraph', function() { + var options = { + lengthThreshold: { + headingLength: ['2'] + } + }; + var params = checkSetup( + '

el

' + '

elm2elm2

', + options + ); + assert.isUndefined( + axe.testUtils + .getCheckEvaluate('p-as-heading') + .apply(checkContext, params) + ); + }); + }); + describe('option.margin', function() { it('passes if no margins are set', function() { var options = {}; From 247f2fd718ab1f4b3d3e4d7d480f2913ec6f8776 Mon Sep 17 00:00:00 2001 From: Gabe Olesen Date: Fri, 1 Oct 2021 14:01:42 +0100 Subject: [PATCH 5/8] update heuristics, add tests --- .../navigation/p-as-heading-evaluate.js | 27 +++--- lib/checks/navigation/p-as-heading.json | 6 +- test/checks/navigation/p-as-heading.js | 83 +++++++------------ .../rules/p-as-heading/p-as-heading.html | 13 ++- .../rules/p-as-heading/p-as-heading.json | 3 +- 5 files changed, 53 insertions(+), 79 deletions(-) diff --git a/lib/checks/navigation/p-as-heading-evaluate.js b/lib/checks/navigation/p-as-heading-evaluate.js index 7cd0834fe1..4a7e35917f 100644 --- a/lib/checks/navigation/p-as-heading-evaluate.js +++ b/lib/checks/navigation/p-as-heading-evaluate.js @@ -79,22 +79,14 @@ function pAsHeadingEvaluate(node, options, virtualNode) { const nextStyle = nextSibling ? getStyleValues(nextSibling) : null; const prevStyle = prevSibling ? getStyleValues(prevSibling) : null; - if (node && nextSibling) { - const optionsHeadingLength = options.lengthThreshold.headingLength || []; - const optionsParagraphLength = - options.lengthThreshold.paragraphLength || []; - - const headingLength = node.textContent.trim().length * optionsHeadingLength; - const paragraphLength = - nextSibling.textContent.trim().length * optionsParagraphLength; - - if (headingLength > paragraphLength) { - return true; - } else if (headingLength < paragraphLength / 2) { - return false; - } else if (headingLength < paragraphLength) { - return undefined; - } + const optionsPassLength = options.passLength; + const optionsFailLength = options.failLength; + + const headingLength = node.textContent.trim().length; + const paragraphLength = nextSibling?.textContent.trim().length; + + if (headingLength > paragraphLength * optionsPassLength) { + return true; } if (!nextStyle || !isHeaderStyle(currStyle, nextStyle, margins)) { @@ -110,6 +102,9 @@ function pAsHeadingEvaluate(node, options, virtualNode) { return undefined; } + if (headingLength > paragraphLength * optionsFailLength) { + return undefined; + } return false; } diff --git a/lib/checks/navigation/p-as-heading.json b/lib/checks/navigation/p-as-heading.json index 5647b3b5a9..bb7d78a91c 100644 --- a/lib/checks/navigation/p-as-heading.json +++ b/lib/checks/navigation/p-as-heading.json @@ -19,10 +19,8 @@ "size": 1.4 } ], - "lengthThreshold": { - "headingLength": ["1"], - "paragraphLength": ["1"] - } + "passLength": 1, + "failLength": 0.5 }, "metadata": { "impact": "serious", diff --git a/test/checks/navigation/p-as-heading.js b/test/checks/navigation/p-as-heading.js index 7bcdf8ad59..40edbfef05 100644 --- a/test/checks/navigation/p-as-heading.js +++ b/test/checks/navigation/p-as-heading.js @@ -36,7 +36,7 @@ describe('p-as-heading', function() { it('returns false if the font-weight is heavier', function() { var params = checkSetup( - '

elm 1

' + '

elm 2

', + '

elm 1

' + '

elm 2elm 2

', testOptions ); assert.isFalse( @@ -46,7 +46,7 @@ describe('p-as-heading', function() { it('returns false if the font-size is bigger', function() { var params = checkSetup( - '

elm 1

elm 2

', + '

elm 1

elm 2elm 2

', testOptions ); assert.isFalse( @@ -56,7 +56,7 @@ describe('p-as-heading', function() { it('returns false if the fake heading is italic and the text is not', function() { var params = checkSetup( - '

elm 1

elm 2

', + '

elm 1

elm 2elm 2

', testOptions ); assert.isFalse( @@ -67,7 +67,7 @@ describe('p-as-heading', function() { it('returns true if both texts are bold, italic and larger', function() { var params = checkSetup( '

elm 1

' + - '

elm 2

', + '

elm 2elm 2

', testOptions ); assert.isTrue( @@ -77,7 +77,7 @@ describe('p-as-heading', function() { it('considers styles of elements inside the paragraph', function() { var params = checkSetup( - '

elm 1

elm 2

', + '

elm 1

elm 2elm 2

', testOptions ); assert.isFalse( @@ -87,7 +87,7 @@ describe('p-as-heading', function() { it('ignores empty child element for style', function() { var params = checkSetup( - '

elm 1

elm 2

', + '

elm 1

elm 2elm 2

', testOptions ); assert.isFalse( @@ -97,7 +97,7 @@ describe('p-as-heading', function() { it('considers styles of elements that do not contain all the text', function() { var params = checkSetup( - '

elm 1

elm 2

', + '

elm 1

elm 2elm 2

', testOptions ); assert.isTrue( @@ -108,7 +108,7 @@ describe('p-as-heading', function() { it('returns undefined instead of false if the element is inside a blockquote', function() { var params = checkSetup( '
' + - '

elm 1

elm 2

' + + '

elm 1

elm 2elm 2

' + '
', testOptions ); @@ -120,7 +120,7 @@ describe('p-as-heading', function() { it('returns true over undefined from within a blockquote', function() { var params = checkSetup( '
' + - '

elm 1

elm 2

' + + '

elm 1

elm 2elm 2

' + '
', testOptions ); @@ -141,7 +141,7 @@ describe('p-as-heading', function() { ); }); - it('returns true if the heading elm length is greater than the paragraph elm', function() { + it('returns true if the heading is greater than the paragraph', function() { var params = checkSetup( '

elm1elm1

' + '

elm2

', testOptions @@ -151,34 +151,25 @@ describe('p-as-heading', function() { ); }); - it('returns false if the heading is 200% shorter than the paragraph ', function() { + it('returns undefined if the heading is twice as long but not greater than the length of the pararaph', function() { var params = checkSetup( - '

el1

' + '

elm2elm2

', - testOptions - ); - assert.isFalse( - axe.testUtils.getCheckEvaluate('p-as-heading').apply(checkContext, params) - ); - }); - - it('returns undefined if the heading is twice as long but not greater than the length of the pararaph ', function() { - var params = checkSetup( - '

elel

' + '

elm2elm2

', + '

elm1elm

' + '

elm2elm2

', testOptions ); assert.isUndefined( axe.testUtils.getCheckEvaluate('p-as-heading').apply(checkContext, params) ); }); - describe('options.lengthThreshold', function() { - it('returns true when options.lengthThreshold.headingLength is greater than the paragraph', function() { + + describe('options.passLength and options.failLength', function() { + it('returns true if the heading is greater than the paragraph using options.passLength', function() { var options = { - lengthThreshold: { - headingLength: ['3'] - } + margins: [{ weight: 100 }, { italic: true }, { size: 1.2 }], + passLength: 2 }; + var params = checkSetup( - '

elm2

' + '

elm2elm2/p>', + '

elm1elm1elm1

' + '

elm2

', options ); assert.isTrue( @@ -188,14 +179,14 @@ describe('p-as-heading', function() { ); }); - it('returns false when options.lengthThreshold.headingLength 200% shorter than the paragraph', function() { + it('returns undefined if the heading is twice as long but not greater than the length of the pararaph using options.failLength ', function() { var options = { - lengthThreshold: { - headingLength: ['2'] - } + margins: [{ weight: 100 }, { italic: true }, { size: 1.2 }], + failLength: 0.6 }; var params = checkSetup( - '

el

' + '

elm2elm2elm2elm2

', + '

elm1elm

' + + '

elm2elm2elm2

', options ); assert.isFalse( @@ -204,23 +195,6 @@ describe('p-as-heading', function() { .apply(checkContext, params) ); }); - - it('returns undefined when options.lengthThreshold.headingLength is twice as long but not greater than the paragraph', function() { - var options = { - lengthThreshold: { - headingLength: ['2'] - } - }; - var params = checkSetup( - '

el

' + '

elm2elm2

', - options - ); - assert.isUndefined( - axe.testUtils - .getCheckEvaluate('p-as-heading') - .apply(checkContext, params) - ); - }); }); describe('option.margin', function() { @@ -228,7 +202,7 @@ describe('p-as-heading', function() { var options = {}; var params = checkSetup( - '

elm 1

elm 2

', + '

elm 1

elm 2elm 2

', options ); assert.isTrue( @@ -244,7 +218,7 @@ describe('p-as-heading', function() { }; var params = checkSetup( - '

elm 1

elm 2

', + '

elm 1

elm 2elm 2

', options ); assert.isTrue( @@ -261,7 +235,7 @@ describe('p-as-heading', function() { var params = checkSetup( '

elm 1

' + - '

elm 2

', + '

elm 2elm 2

', options ); assert.isFalse( @@ -293,7 +267,8 @@ describe('p-as-heading', function() { }; var params = checkSetup( - '

elm 1

' + '

elm 2

', + '

elm 1

' + + '

elm 2elm 2

', options ); assert.isFalse( diff --git a/test/integration/rules/p-as-heading/p-as-heading.html b/test/integration/rules/p-as-heading/p-as-heading.html index 5ffd17d5a0..1be3c19860 100644 --- a/test/integration/rules/p-as-heading/p-as-heading.html +++ b/test/integration/rules/p-as-heading/p-as-heading.html @@ -43,29 +43,34 @@

A paragraph!

+
+

Hello World

+

Hello

+
+

Some text

-

A paragraph!

+

A paragraph, A paragraph!

Some text

-

A paragraph!

+

A paragraph, A paragraph!

Some text

-

A paragraph!

+

A paragraph, A paragraph!

Some text

Some text

-

A paragraph!

+

A paragraph, A paragraph!

diff --git a/test/integration/rules/p-as-heading/p-as-heading.json b/test/integration/rules/p-as-heading/p-as-heading.json index b8c106884e..5a2a189659 100644 --- a/test/integration/rules/p-as-heading/p-as-heading.json +++ b/test/integration/rules/p-as-heading/p-as-heading.json @@ -7,7 +7,8 @@ ["#passed2"], ["#passed3"], ["#passed4"], - ["#passed5"] + ["#passed5"], + ["#passed6"] ], "incomplete": [["#canttell1"], ["#canttell2"]] } From e5c5310a2ed6158c89208ba314d87343c94e071a Mon Sep 17 00:00:00 2001 From: Gabe Olesen Date: Fri, 1 Oct 2021 16:47:38 +0100 Subject: [PATCH 6/8] document new check-options --- doc/check-options.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/check-options.md b/doc/check-options.md index 17f5adac6c..735c0bd40f 100644 --- a/doc/check-options.md +++ b/doc/check-options.md @@ -415,8 +415,25 @@ h6:not([role]), { "size": 1.4 } ] - Common CSS values used to display `p` elements as `h1-h6` elements determining if a `p` element is being improperly repurposed + + + passLength + + +
"passLength": 1
+ + Valid length used to check if a paragraph element is not being used as a heading + + + + faiLength + + +
"failLength": 0.5
+ + Invalid length used to check if a paragraph element is being used as a heading + From 000152d0ccd4cbb167fcb8c833813ada6d465ca5 Mon Sep 17 00:00:00 2001 From: Gabe <41127686+Zidious@users.noreply.github.com> Date: Fri, 1 Oct 2021 17:14:14 +0100 Subject: [PATCH 7/8] changes requested Co-authored-by: Wilco Fiers --- doc/check-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/check-options.md b/doc/check-options.md index 735c0bd40f..f0c326e60b 100644 --- a/doc/check-options.md +++ b/doc/check-options.md @@ -423,7 +423,7 @@ h6:not([role]),
"passLength": 1
- Valid length used to check if a paragraph element is not being used as a heading + Relative length, if the the candidate heading is X times or greater the length of the candidate paragraph, it will pass. From 9f3535421aae54ae960075dd4a0482d56754cdf1 Mon Sep 17 00:00:00 2001 From: Gabe <41127686+Zidious@users.noreply.github.com> Date: Fri, 1 Oct 2021 17:14:32 +0100 Subject: [PATCH 8/8] changes requested Co-authored-by: Wilco Fiers --- doc/check-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/check-options.md b/doc/check-options.md index f0c326e60b..392c1e02e1 100644 --- a/doc/check-options.md +++ b/doc/check-options.md @@ -432,7 +432,7 @@ h6:not([role]),
"failLength": 0.5
- Invalid length used to check if a paragraph element is being used as a heading + Relative length, if the the candidate heading is X times or less the length of the candidate paragraph, it can fail.