Skip to content

Commit 41336c4

Browse files
committed
Fix mobile table accessibility
1 parent eca4187 commit 41336c4

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/components/BlockRenderer.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,15 @@ export function BlockRenderer({
230230
return (
231231
<Panel block={block} emphasized={emphasized} layout={layout}>
232232
{block.rows.length ? (
233-
<div className="overflow-x-auto rounded-lg border border-border">
233+
<div
234+
aria-label={`${block.title} table`}
235+
className="overflow-x-auto rounded-lg border border-border focus-visible:ring-2 focus-visible:ring-ring"
236+
role="region"
237+
tabIndex={0}
238+
>
234239
<table className="w-full min-w-[520px] border-collapse text-left text-sm">
235240
<caption className="sr-only">{block.title}</caption>
236-
<thead className="bg-muted/70 text-xs text-muted-foreground">
241+
<thead className="bg-muted/70 text-xs text-foreground">
237242
<tr>
238243
{block.columns.map((column) => (
239244
<th className="px-3 py-2.5 font-medium" key={column.key}>

0 commit comments

Comments
 (0)