openvibers/openvibe.ai Commits
WCAG AA: the What you get rail is reachable by keyboard (#254)
Changes
@@@ -153,7 +153,7 @@ function sections({ siteUrl, stats }) {{ icon: 'ov:account', title: 'Your project\'s runs', text: 'Runs belong to your project: another project can never read them. Usage is metered per project, with a free allowance first.' },{ icon: 'ov:code', title: 'Open source', text: 'AGPL-3.0, built in the open. Every guarantee on this page has a test in the repository.' },],-- }) + models(stats)++ }).replace('<div class="sc-grid">', '<div class="sc-grid" role="region" aria-label="What you get" tabindex="0">') + models(stats)+ '<section class="sc-sec" id="build" aria-labelledby="h-build"><details class="ai-fold"><summary><h2 id="h-build">Build with it</h2><span>the OpenAI SDK, curl, four steps, sandbox and production</span></summary>'+ showcase.code({id: 'openai',@@@ -38,6 +38,7 @@ t.test('GET / as a browser: the home page, its CSP and a private cache', async (assert.match(r.headers.get('vary'), /Accept/);assert.strictEqual((r.text.match(/<h1\b/g) || []).length, 1, 'exactly one h1');assert.ok(r.text.includes('Many models, one API.'), 'the hero');++ assert.ok(r.text.includes('<div class="sc-grid" role="region" aria-label="What you get" tabindex="0">'), 'the sideways rail is reachable by keyboard');assert.ok(r.text.includes('point it at /v1 for Chat Completions with tools'), 'the OpenAI-compatible endpoint is on the home');assert.ok(r.text.includes('Your project's own provider') || r.text.includes("Your project's own provider"), 'the project\'s own provider row');assert.ok(!r.text.includes('metered models under a project budget'), 'production app runs are free-only until project budgets open');
@@ -153,7 +153,7 @@ function sections({ siteUrl, stats }) {
@@ -153,7 +153,7 @@ function sections({ siteUrl, stats }) {
{ icon: 'ov:account', title: 'Your project\'s runs', text: 'Runs belong to your project: another project can never read them. Usage is metered per project, with a free allowance first.' },
{ icon: 'ov:account', title: 'Your project\'s runs', text: 'Runs belong to your project: another project can never read them. Usage is metered per project, with a free allowance first.' },
{ icon: 'ov:code', title: 'Open source', text: 'AGPL-3.0, built in the open. Every guarantee on this page has a test in the repository.' },
{ icon: 'ov:code', title: 'Open source', text: 'AGPL-3.0, built in the open. Every guarantee on this page has a test in the repository.' },
],
],
- }) + models(stats)
+ }).replace('<div class="sc-grid">', '<div class="sc-grid" role="region" aria-label="What you get" tabindex="0">') + models(stats)
+ '<section class="sc-sec" id="build" aria-labelledby="h-build"><details class="ai-fold"><summary><h2 id="h-build">Build with it</h2><span>the OpenAI SDK, curl, four steps, sandbox and production</span></summary>'
+ '<section class="sc-sec" id="build" aria-labelledby="h-build"><details class="ai-fold"><summary><h2 id="h-build">Build with it</h2><span>the OpenAI SDK, curl, four steps, sandbox and production</span></summary>'
+ showcase.code({
+ showcase.code({
id: 'openai',
id: 'openai',
@@ -38,6 +38,7 @@ t.test('GET / as a browser: the home page, its CSP and a private cache', async (
@@ -38,6 +38,7 @@ t.test('GET / as a browser: the home page, its CSP and a private cache', async (
assert.match(r.headers.get('vary'), /Accept/);
assert.match(r.headers.get('vary'), /Accept/);
assert.strictEqual((r.text.match(/<h1\b/g) || []).length, 1, 'exactly one h1');
assert.strictEqual((r.text.match(/<h1\b/g) || []).length, 1, 'exactly one h1');
assert.ok(r.text.includes('Many models, one API.'), 'the hero');
assert.ok(r.text.includes('Many models, one API.'), 'the hero');
+ assert.ok(r.text.includes('<div class="sc-grid" role="region" aria-label="What you get" tabindex="0">'), 'the sideways rail is reachable by keyboard');
assert.ok(r.text.includes('point it at /v1 for Chat Completions with tools'), 'the OpenAI-compatible endpoint is on the home');
assert.ok(r.text.includes('point it at /v1 for Chat Completions with tools'), 'the OpenAI-compatible endpoint is on the home');
assert.ok(r.text.includes('Your project's own provider') || r.text.includes("Your project's own provider"), 'the project\'s own provider row');
assert.ok(r.text.includes('Your project's own provider') || r.text.includes("Your project's own provider"), 'the project\'s own provider row');
assert.ok(!r.text.includes('metered models under a project budget'), 'production app runs are free-only until project budgets open');
assert.ok(!r.text.includes('metered models under a project budget'), 'production app runs are free-only until project budgets open');