Skip to content

Commit b8c6fc4

Browse files
Copilothotlong
andcommitted
fix: address code review accessibility feedback for section icons, summary gear, and subsections
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 5ffc82f commit b8c6fc4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/components/src/custom/config-field-renderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export function ConfigFieldRenderer({
249249
{field.summaryText ?? effectiveValue ?? ''}
250250
</span>
251251
{field.onSummaryClick && (
252-
<Settings className="h-3.5 w-3.5 text-muted-foreground shrink-0" data-testid={`config-field-${field.key}-gear`} />
252+
<Settings className="h-3.5 w-3.5 text-muted-foreground shrink-0" aria-hidden="true" data-testid={`config-field-${field.key}-gear`} />
253253
)}
254254
</div>
255255
</ConfigRow>

packages/components/src/custom/config-panel-renderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export function ConfigPanelRenderer({
249249
if (sub.visibleWhen && !sub.visibleWhen(draft)) return null;
250250
const subCollapsed = isCollapsed(sub.key, sub.defaultCollapsed);
251251
return (
252-
<div key={sub.key} data-testid={`config-subsection-${sub.key}`} className="ml-1">
252+
<div key={sub.key} data-testid={`config-subsection-${sub.key}`} className="ml-1" role="group" aria-label={sub.title}>
253253
<SectionHeader
254254
title={sub.title}
255255
icon={sub.icon}

packages/components/src/custom/section-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface SectionHeaderProps {
3636
function SectionHeader({ title, icon, collapsible, collapsed, onToggle, testId, className }: SectionHeaderProps) {
3737
const titleContent = (
3838
<h3 className="text-xs font-semibold text-foreground uppercase tracking-wider flex items-center gap-1.5">
39-
{icon && <span className="text-muted-foreground shrink-0">{icon}</span>}
39+
{icon && <span className="text-muted-foreground shrink-0" aria-hidden="true">{icon}</span>}
4040
{title}
4141
</h3>
4242
)

0 commit comments

Comments
 (0)