openvibers/openvibe.help Commits
Help: /sites names where its list came from (the provenance link was empty; axe link-name) (#40)
Changes
@@@ -57,7 +57,7 @@ function createPageRoutes(ctx) {/** Where a page's text came from: the manifests it was read from, and when. */const provenance = (p, { compact = false } = {}) => {const files = p.manifests || (p.manifest ? [p.manifest] : []);-- return html`<p class="prov small muted">Generated from <a href="${p.url}" rel="noopener nofollow">${p.source}</a>${files.length ? html` · ${files.map((f) => html`<code>${f}</code>`)}` : ''}${compact ? '' : html` · read ${time(catalog.generatedAt)}`}</p>`;++ return html`<p class="prov small muted">Generated from <a href="${p.url}" rel="noopener nofollow">${p.source || p.name}</a>${files.length ? html` · ${files.map((f) => html`<code>${f}</code>`)}` : ''}${compact ? '' : html` · read ${time(catalog.generatedAt)}`}</p>`;};const signInPrompt = (what, next) => html`<div class="notice">${what} <a href="/auth/login?next=${encodeURIComponent(next)}">Sign in with OpenVibe</a>.</div>`;@@@ -109,6 +109,15 @@ const WITH_FAQ = [assert.ok(r.text.includes('href="https://openvibe.actor/updates"'), 'no link to its /updates');});++ await check('every provenance line names its source: no empty link (axe link-name on /sites, 2026-10-15)', async () => {++ for (const path of ['/sites', '/sites/openvibe.actor']) {++ const r = await t.get(path);++ const links = [...r.text.matchAll(/Generated from <a [^>]*>([^<]*)<\/a>/g)].map((m) => m[1]);++ assert.ok(links.length, `${path} has a provenance line`);++ assert.ok(links.every((x) => x.trim()), `${path} has an empty provenance link`);++ }++ });++await check('a site the catalog does not know is a 404 page, and the URL it was asked for is escaped', async () => {const r = await t.get('/sites/nope');assert.strictEqual(r.status, 404);
@@ -57,7 +57,7 @@ function createPageRoutes(ctx) {
@@ -57,7 +57,7 @@ function createPageRoutes(ctx) {
/** Where a page's text came from: the manifests it was read from, and when. */
/** Where a page's text came from: the manifests it was read from, and when. */
const provenance = (p, { compact = false } = {}) => {
const provenance = (p, { compact = false } = {}) => {
const files = p.manifests || (p.manifest ? [p.manifest] : []);
const files = p.manifests || (p.manifest ? [p.manifest] : []);
- return html`<p class="prov small muted">Generated from <a href="${p.url}" rel="noopener nofollow">${p.source}</a>${files.length ? html` · ${files.map((f) => html`<code>${f}</code>`)}` : ''}${compact ? '' : html` · read ${time(catalog.generatedAt)}`}</p>`;
+ return html`<p class="prov small muted">Generated from <a href="${p.url}" rel="noopener nofollow">${p.source || p.name}</a>${files.length ? html` · ${files.map((f) => html`<code>${f}</code>`)}` : ''}${compact ? '' : html` · read ${time(catalog.generatedAt)}`}</p>`;
};
};
const signInPrompt = (what, next) => html`<div class="notice">${what} <a href="/auth/login?next=${encodeURIComponent(next)}">Sign in with OpenVibe</a>.</div>`;
const signInPrompt = (what, next) => html`<div class="notice">${what} <a href="/auth/login?next=${encodeURIComponent(next)}">Sign in with OpenVibe</a>.</div>`;
@@ -109,6 +109,15 @@ const WITH_FAQ = [
@@ -109,6 +109,15 @@ const WITH_FAQ = [
assert.ok(r.text.includes('href="https://openvibe.actor/updates"'), 'no link to its /updates');
assert.ok(r.text.includes('href="https://openvibe.actor/updates"'), 'no link to its /updates');
});
});
+ await check('every provenance line names its source: no empty link (axe link-name on /sites, 2026-10-15)', async () => {
+ for (const path of ['/sites', '/sites/openvibe.actor']) {
+ const r = await t.get(path);
+ const links = [...r.text.matchAll(/Generated from <a [^>]*>([^<]*)<\/a>/g)].map((m) => m[1]);
+ assert.ok(links.length, `${path} has a provenance line`);
+ assert.ok(links.every((x) => x.trim()), `${path} has an empty provenance link`);
+ }
+ });
+
await check('a site the catalog does not know is a 404 page, and the URL it was asked for is escaped', async () => {
await check('a site the catalog does not know is a 404 page, and the URL it was asked for is escaped', async () => {
const r = await t.get('/sites/nope');
const r = await t.get('/sites/nope');
assert.strictEqual(r.status, 404);
assert.strictEqual(r.status, 404);