Skip to content

Commit a4bec69

Browse files
Copilothotlong
andcommitted
fix: add aria-expanded to collapsible sections and role=radio to row height buttons for accessibility
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent e2acfe0 commit a4bec69

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

apps/console/src/components/ViewConfigPanel.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ function SectionHeader({ title, collapsible, collapsed, onToggle, testId }: { ti
259259
className="flex items-center justify-between pt-4 pb-1.5 first:pt-0 w-full text-left"
260260
onClick={onToggle}
261261
type="button"
262+
aria-expanded={!collapsed}
262263
>
263264
<h3 className="text-xs font-semibold text-foreground uppercase tracking-wider">{title}</h3>
264265
{collapsed ? (
@@ -833,11 +834,14 @@ export function ViewConfigPanel({ open, onClose, mode = 'edit', activeView, obje
833834
</select>
834835
</ConfigRow>
835836
<ConfigRow label={t('console.objectView.rowHeight')}>
836-
<div className="flex gap-0.5" data-testid="appearance-rowHeight">
837+
<div className="flex gap-0.5" data-testid="appearance-rowHeight" role="radiogroup" aria-label={t('console.objectView.rowHeight')}>
837838
{ROW_HEIGHT_OPTIONS.map(opt => (
838839
<button
839840
key={opt.value}
840841
type="button"
842+
role="radio"
843+
aria-checked={(draft.rowHeight || 'short') === opt.value}
844+
aria-label={opt.value}
841845
data-testid={`row-height-${opt.value}`}
842846
className={`h-7 w-7 rounded border flex items-center justify-center ${
843847
(draft.rowHeight || 'short') === opt.value

0 commit comments

Comments
 (0)