hdoc-tools 0.43.0 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hdoc-validate.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const e = require("express");
2
+ const { error } = require("node:console");
2
3
 
3
4
  (() => {
4
5
  const axios = require("axios");
@@ -884,6 +885,9 @@ const e = require("express");
884
885
  .get();
885
886
  const srcs = $("img")
886
887
  .map(function (i) {
888
+ if ($(this).attr("alt") === undefined || $(this).attr("alt").trim() === "") {
889
+ errors[file.relativePath].push(`Image tag with src [${$(this).attr("src")}] is missing alt attribute.`);
890
+ }
887
891
  return $(this).attr("src");
888
892
  })
889
893
  .get();
@@ -1132,7 +1136,7 @@ const e = require("express");
1132
1136
  for (const key in errors) {
1133
1137
  if (Object.hasOwn(errors, key) && errors[key].length > 0) {
1134
1138
  for (let i = 0; i < errors[key].length; i++) {
1135
- console.error(`${errors[key][i]}`);
1139
+ console.error(`${key} - ${errors[key][i]}`);
1136
1140
  error_count++;
1137
1141
  }
1138
1142
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.43.0",
3
+ "version": "0.45.0",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {
@@ -4,9 +4,6 @@
4
4
  <ul class="ps-0 nav-bar-nav-list noeffects after-fslash overflow-ellipsis">{{breadcrumbs}}</ul>
5
5
  </div>
6
6
  <div class="toolbar-right hb-center-v">
7
- <a class="toolbar-action documentation-menu-popper">
8
- <i class="bi bi-three-dots-vertical"></i>
9
- </a>
10
7
  </div>
11
8
  </div>
12
9
 
@@ -4,12 +4,9 @@
4
4
  <ul class="ps-0 nav-bar-nav-list noeffects after-fslash overflow-ellipsis">{{breadcrumbs}}</ul>
5
5
  </div>
6
6
  <div class="toolbar-right hb-center-v">
7
- <a target="_blank" class="toolbar-action" href="{{edit-url}}">
8
- <i class="bi bi-pencil"></i>
7
+ <a target="_blank" class="toolbar-action" href="{{edit-url}}" aria-label="Edit this page on GitHub">
8
+ <i class="bi bi-pencil" aria-hidden="true"></i>
9
9
  </a>
10
- <a class="toolbar-action documentation-menu-popper">
11
- <i class="bi bi-three-dots-vertical"></i>
12
- </a>
13
10
  </div>
14
11
  </div>
15
12
 
@@ -244,7 +244,7 @@ function generateTableOfContentsFromDoc() {
244
244
 
245
245
  //-- add link icon to header (using seo id)
246
246
  $(item).append(
247
- "<a class='header-anchor'><i class='bi bi-link'></i></a>",
247
+ `<a class="header-anchor" aria-label="Link to this section: ${strLabel}"><i class="bi bi-link" aria-hidden="true"></i></a>`,
248
248
  );
249
249
  $(item).find("a").attr("href", linkUrl);
250
250
  }