Grid: no way to give the role="grid" element an accessible name
Version: @svar-ui/svelte-grid 2.7.3
What happens. The element rendered with role="grid" has no accessible name, and the public API gives no way to set one. Reading Grid.svelte, props outside its declared list are treated as event-callback bindings, so aria-label or aria-labelledby passed to <Grid> never reach the DOM. The type definitions declare no ariaLabel, ariaLabelledby or id prop either.
Why it matters. WAI-ARIA 1.2 lists an accessible name as required for the grid role. Without one, a screen reader announces the grid with no context about what it contains.
Expected. A way to name the grid element: for example ariaLabel / ariaLabelledby props, or pass-through of aria-* attributes, landing on the role="grid" element.
Steps to reproduce.
<script>
import { Grid } from "@svar-ui/svelte-grid";
const columns = [{ id: "name", header: "Name" }];
const data = [{ id: 1, name: "A" }];
</script>
<Grid {columns} {data} aria-label="Products" />
Inspect the rendered [role="grid"] element: it carries no aria-label or aria-labelledby.
Workaround in use. We wrap the grid in a <section aria-labelledby="..."> that points at a visible heading. That names the surrounding region, but not the grid itself.
Hello @ElmirSecerbegovicGEN79 ,
Thank you for a suggestion of improving the Grid's accessibility. I have passed it to our development team so they will consider adding the requested. We will notify you about any updates on the matter.