Skip to content
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

core: remove duplicate-id-active #15900

Merged
merged 2 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions cli/test/fixtures/a11y/a11y_tester.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@
<dd></dd>
</div>
</section>
<p>duplicate-id-active</p>
<section>
<textarea id="duplicate-id-active" aria-label="text1"></textarea>
<textarea id="duplicate-id-active" aria-label="text2"></textarea>
</section>
<p>duplicate-id-aria</p>
<section>
<div id="duplicate-id-aria" class="duplicate-id-aria"></span>
Expand Down
43 changes: 6 additions & 37 deletions cli/test/smokehouse/test-definitions/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,37 +452,6 @@ const expectations = {

},
},
'duplicate-id-active': {
score: 0,
details: {
items: [
{
node: {
'type': 'node',
'selector': 'body > section > textarea#duplicate-id-active',
'path': '2,HTML,1,BODY,47,SECTION,0,TEXTAREA',
'snippet': '<textarea id="duplicate-id-active" aria-label="text1">',
'explanation': 'Fix any of the following:\n Document has active elements with the same id attribute: duplicate-id-active',
'nodeLabel': 'text1',
},
subItems: {
type: 'subitems',
items: [
{
relatedNode: {
'type': 'node',
'path': '2,HTML,1,BODY,47,SECTION,1,TEXTAREA',
'selector': 'body > section > textarea#duplicate-id-active',
'snippet': '<textarea id="duplicate-id-active" aria-label="text2">',
'nodeLabel': 'text2',
},
},
],
},
},
],
},
},
'duplicate-id-aria': {
score: 1,
details: {
Expand All @@ -491,7 +460,7 @@ const expectations = {
node: {
'type': 'node',
'selector': 'body > section > div#duplicate-id-aria',
'path': '2,HTML,1,BODY,49,SECTION,0,DIV',
'path': '2,HTML,1,BODY,47,SECTION,0,DIV',
'snippet': '<div id="duplicate-id-aria" class="duplicate-id-aria">',
'explanation': 'Fix any of the following:\n Document has multiple elements referenced with ARIA with the same id attribute: duplicate-id-aria',
'nodeLabel': 'body > section > div#duplicate-id-aria',
Expand All @@ -502,7 +471,7 @@ const expectations = {
{
relatedNode: {
'type': 'node',
'path': '2,HTML,1,BODY,49,SECTION,0,DIV,0,DIV',
'path': '2,HTML,1,BODY,47,SECTION,0,DIV,0,DIV',
'selector': 'body > section > div#duplicate-id-aria > div#duplicate-id-aria',
'snippet': '<div id="duplicate-id-aria">',
'nodeLabel': 'body > section > div#duplicate-id-aria > div#duplicate-id-aria',
Expand Down Expand Up @@ -539,7 +508,7 @@ const expectations = {
node: {
'type': 'node',
'selector': 'body > section > input#form-field-multiple-labels',
'path': '2,HTML,1,BODY,53,SECTION,2,INPUT',
'path': '2,HTML,1,BODY,51,SECTION,2,INPUT',
'snippet': '<input type="checkbox" id="form-field-multiple-labels">',
'explanation': 'Fix all of the following:\n Multiple label elements is not widely supported in assistive technologies. Ensure the first label contains all necessary information.',
'nodeLabel': 'body > section > input#form-field-multiple-labels',
Expand All @@ -550,7 +519,7 @@ const expectations = {
{
relatedNode: {
'type': 'node',
'path': '2,HTML,1,BODY,53,SECTION,0,LABEL',
'path': '2,HTML,1,BODY,51,SECTION,0,LABEL',
'selector': 'body > section > label#label1',
'snippet': '<label for="form-field-multiple-labels" id="label1">',
'nodeLabel': 'label1',
Expand All @@ -559,7 +528,7 @@ const expectations = {
{
relatedNode: {
'type': 'node',
'path': '2,HTML,1,BODY,53,SECTION,1,LABEL',
'path': '2,HTML,1,BODY,51,SECTION,1,LABEL',
'selector': 'body > section > label',
'snippet': '<label for="form-field-multiple-labels">',
'nodeLabel': 'label2',
Expand Down Expand Up @@ -595,7 +564,7 @@ const expectations = {
node: {
'type': 'node',
'selector': 'body > section > h3',
'path': '2,HTML,1,BODY,57,SECTION,1,H3',
'path': '2,HTML,1,BODY,55,SECTION,1,H3',
'snippet': '<h3>',
'explanation': 'Fix any of the following:\n Heading order invalid',
'nodeLabel': 'sub-sub-header',
Expand Down
42 changes: 0 additions & 42 deletions core/audits/accessibility/duplicate-id-active.js

This file was deleted.

2 changes: 0 additions & 2 deletions core/config/default-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ const defaultConfig = {
'accessibility/definition-list',
'accessibility/dlitem',
'accessibility/document-title',
'accessibility/duplicate-id-active',
'accessibility/duplicate-id-aria',
'accessibility/empty-heading',
'accessibility/form-field-multiple-labels',
Expand Down Expand Up @@ -525,7 +524,6 @@ const defaultConfig = {
{id: 'definition-list', weight: 7, group: 'a11y-tables-lists'},
{id: 'dlitem', weight: 7, group: 'a11y-tables-lists'},
{id: 'document-title', weight: 7, group: 'a11y-names-labels'},
{id: 'duplicate-id-active', weight: 7, group: 'a11y-navigation'},
{id: 'duplicate-id-aria', weight: 10, group: 'a11y-aria'},
{id: 'form-field-multiple-labels', weight: 3, group: 'a11y-names-labels'},
{id: 'frame-title', weight: 7, group: 'a11y-names-labels'},
Expand Down
1 change: 0 additions & 1 deletion core/gather/gatherers/accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ async function runA11yChecks() {
'aria-text': {enabled: true},
'audio-caption': {enabled: false},
'blink': {enabled: false},
'duplicate-id-active': {enabled: true},
'duplicate-id': {enabled: false},
'empty-heading': {enabled: true},
'frame-focusable-content': {enabled: false},
Expand Down
Loading
Loading