[www] associates model id with copy id button - #1116
Prathik Rao (prathikr) wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
🟡 Changes recommended
Accessible naming and formatting issues must be addressed before approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This pull request associates visible model IDs with Copy ID controls and adds accessibility regression coverage.
Changes:
- Adds model ID attributes and ARIA references.
- Adds accessibility assertions.
File summaries
| File | Description |
|---|---|
www/src/routes/models/components/ModelDetailsModal.svelte |
Associates model IDs with Copy ID buttons. |
www/test/accessibility.test.mjs |
Tests the new accessibility attributes. |
Review details
Suppressed comments (4)
www/src/routes/models/components/ModelDetailsModal.svelte:465
- Because
aria-labelledbytakes precedence over a button's own contents in the accessible-name computation, this makes the control's name only the model ID; screen-reader users lose the "Copy ID" action even though it remains visible. Preserve the action in the accessible name—for example, reference both the model ID and a span containing "Copy ID", or use the model ID asaria-describedby.
aria-labelledby={`model-id-${variant.name}`}
www/src/routes/models/components/ModelDetailsModal.svelte:506
- Because
aria-labelledbytakes precedence over a button's own contents in the accessible-name computation, this makes the control's name only the model ID; screen-reader users lose the "Copy ID" action even though it remains visible. Preserve the action in the accessible name—for example, reference both the model ID and a span containing "Copy ID", or use the model ID asaria-describedby.
aria-labelledby={`model-id-${genericModelName}`}
www/src/routes/models/components/ModelDetailsModal.svelte:602
- Because
aria-labelledbytakes precedence over a button's own contents in the accessible-name computation, this makes the control's name only the model ID; screen-reader users lose the "Copy ID" action even though it remains visible. Preserve the action in the accessible name—for example, reference both the model ID and a span containing "Copy ID", or use the model ID asaria-describedby.
aria-labelledby={`model-id-${variant.name}`}
www/src/routes/models/components/ModelDetailsModal.svelte:602
- This attribute is indented one tab farther than the adjacent
Buttonprops and the analogous attribute above. The website's lint script runsprettier --check .(www/package.json:26), so align it with the surrounding props before merging.
aria-labelledby={`model-id-${variant.name}`}
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <div id={`model-id-${variant.name}`} class="font-mono text-sm font-medium"> | ||
| {variant.name} | ||
| </div> |
| <Button | ||
| variant="outline" | ||
| size="sm" | ||
| aria-labelledby={`model-id-${genericModelName}`} |
fixes #1019