diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c8b2adef..d928ffa1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,6 +23,10 @@ jobs:
run: npm run test-lint-css
env:
CI: true
+ - name: Lint HTML
+ run: npm run test-lint-html
+ env:
+ CI: true
- name: Tests
run: npm run test-code
env:
diff --git a/.htmlvalidate.json b/.htmlvalidate.json
new file mode 100644
index 00000000..bb3c5221
--- /dev/null
+++ b/.htmlvalidate.json
@@ -0,0 +1,18 @@
+{
+ "root": true,
+ "extends": [
+ "html-validate:recommended"
+ ],
+ "rules": {
+ "element-required-attributes": "off",
+ "element-permitted-content": "off",
+ "text-content": "off",
+ "void-style": ["error", {"style": "omit"}],
+ "empty-heading": "off",
+ "wcag/h30": "off",
+ "no-inline-style": "off"
+ },
+ "elements": [
+ "html5"
+ ]
+}
\ No newline at end of file
diff --git a/ext/bg/background.html b/ext/bg/background.html
index 29cae072..29cd1d85 100644
--- a/ext/bg/background.html
+++ b/ext/bg/background.html
@@ -2,7 +2,7 @@
-
+
Background
@@ -53,6 +53,7 @@
This element must appear directly inside the element, and it must not be closed properly.
https://bugzilla.mozilla.org/show_bug.cgi?id=1603985
-->
+
diff --git a/ext/bg/css/settings2.css b/ext/bg/css/settings2.css
index 01c19af4..c0751d47 100644
--- a/ext/bg/css/settings2.css
+++ b/ext/bg/css/settings2.css
@@ -150,6 +150,10 @@ code {
label {
cursor: pointer;
}
+pre {
+ white-space: pre-wrap;
+ margin: 0;
+}
/* Text styles */
@@ -1462,15 +1466,8 @@ button.anki-card-field-value-menu-button {
border-collapse: collapse;
border-spacing: 0;
}
-.anki-field-marker-info-table>thead {
+.anki-field-marker-info-table tr.anki-field-marker-info-table-heading {
font-weight: bold;
-}
-code.anki-field-marker {
- white-space: nowrap;
- font-size: 0.85em;
- font-weight: bold;
-}
-.anki-field-marker-info-table thead tr {
background-color: var(--input-background-color);
}
.anki-field-marker-info-table td {
@@ -1485,6 +1482,11 @@ code.anki-field-marker {
.anki-field-marker-info-table td:nth-last-child(n+2) {
border-right: none;
}
+code.anki-field-marker {
+ white-space: nowrap;
+ font-size: 0.85em;
+ font-weight: bold;
+}
.anki-card-templates-layout {
display: flex;
@@ -1948,6 +1950,13 @@ input.sentence-termination-character-input2 {
padding-left: 0.375em;
}
+.inline-icon {
+ position: relative;
+ width: calc(1em * (16 / var(--font-size-no-units)));
+ height: calc(1em * (16 / var(--font-size-no-units)));
+ top: calc(1em * (3 / var(--font-size-no-units)));
+}
+
/* Generic layouts */
.margin-above {
diff --git a/ext/bg/js/permissions-main.js b/ext/bg/js/permissions-main.js
index cd03dd72..366a057b 100644
--- a/ext/bg/js/permissions-main.js
+++ b/ext/bg/js/permissions-main.js
@@ -82,7 +82,9 @@ async function updatePermissionCheckbox(checkbox, permissions, value) {
const documentFocusController = new DocumentFocusController();
documentFocusController.prepare();
- document.querySelector('#extension-id-example').textContent = chrome.runtime.getURL('/');
+ for (const node of document.querySelectorAll('.extension-id-example')) {
+ node.textContent = chrome.runtime.getURL('/');
+ }
api.forwardLogsToBackend();
await yomichan.prepare();
diff --git a/ext/bg/legal.html b/ext/bg/legal.html
index 85d782a5..3a829abb 100644
--- a/ext/bg/legal.html
+++ b/ext/bg/legal.html
@@ -13,12 +13,6 @@
-
diff --git a/ext/bg/permissions.html b/ext/bg/permissions.html
index 05266b22..57b4b215 100644
--- a/ext/bg/permissions.html
+++ b/ext/bg/permissions.html
@@ -55,7 +55,7 @@
as this can be used to fingerprint browser configuration.
- Example: Origin:
+ Example: Origin:
@@ -70,7 +70,7 @@
as this can be used to fingerprint browser configuration.
- Example: Origin:
+ Example: Origin:
diff --git a/ext/bg/pitch-accents-preview.html b/ext/bg/pitch-accents-preview.html
index 3adae422..b449222b 100644
--- a/ext/bg/pitch-accents-preview.html
+++ b/ext/bg/pitch-accents-preview.html
@@ -35,7 +35,7 @@
Graph -
-
+
diff --git a/ext/bg/search.html b/ext/bg/search.html
index b5e8f746..4537fb85 100644
--- a/ext/bg/search.html
+++ b/ext/bg/search.html
@@ -46,7 +46,7 @@
-
+
diff --git a/ext/bg/settings.html b/ext/bg/settings.html
index 2ccb7a1e..b0a44437 100644
--- a/ext/bg/settings.html
+++ b/ext/bg/settings.html
@@ -2,7 +2,7 @@
-
+
Yomichan Options (Old)
@@ -458,10 +458,10 @@
@@ -702,7 +702,7 @@
-
+
-
+