-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: several fixes (a11y-manager, rules, CSS, checkboxes, etc.)
- Loading branch information
1 parent
b2b5cc0
commit 48bc8f8
Showing
12 changed files
with
118 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default { | ||
description: "`<html />` hat korrektes lang-attribut", | ||
isActive: false, | ||
test: (dom) => { | ||
let node = dom?.querySelector('html'); | ||
let attr = node?.getAttribute('lang'); | ||
|
||
console.debug('node:', node); | ||
console.debug('attr:', attr); | ||
|
||
return attr !== undefined && attr !== null; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default { | ||
description: "Alle `<img />-Elemente` haben ein Alt-Attribut", | ||
isActive: false, | ||
test: (dom) => { | ||
let nodes = Array.from(dom?.querySelectorAll("img")); | ||
let nodesWithoutAlt = nodes.filter((img) => img.getAttribute("alt") === undefined); | ||
|
||
console.debug('nodes:', nodes); | ||
console.debug('nodesWithoutAlt:', nodesWithoutAlt); | ||
|
||
return nodesWithoutAlt.length === 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export default { | ||
description: "Alle Inputs sind mit entsprechenden Label verbunden", | ||
isActive: false, | ||
test: (dom) => { | ||
let inputs = Array.from(dom?.querySelectorAll("input")); | ||
let labels = Array.from(dom?.querySelectorAll("label")); | ||
let nonLinkedInput = inputs.find((input) => { | ||
let inputId = input.getAttribute("id"); | ||
let matchingLabel = labels.find( | ||
(label) => label.getAttribute("for") === inputId, | ||
); | ||
|
||
return inputId === undefined || matchingLabel === undefined; | ||
}); | ||
|
||
console.debug('inputs:', inputs); | ||
console.debug('labels:', labels); | ||
console.debug('nonLinkedInput:', nonLinkedInput); | ||
|
||
return nonLinkedInput === undefined; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default { | ||
description: "Es gibt nur eine `<h1 />` pro Seite", | ||
isActive: false, | ||
test: (dom) => { | ||
let nodes = Array.from(dom?.querySelectorAll("h1")); | ||
|
||
console.debug('nodes:', nodes); | ||
|
||
return nodes.length <= 1; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.