Skip to content

Commit 2ece112

Browse files
haraldschillyclaude
andcommitted
frontend/aria: Complete Phase 10 - Editor Frame Infrastructure
Enhanced ARIA accessibility for the core editor frame system (Phase 10) with comprehensive landmark labels and live region support: **Frame Tree System (title-bar.tsx)**: - Menu navigation: Changed div to <nav> with aria-label - Frame controls region: Added role="region" with layout controls label - Symbol/outline bar: Added role="region" with descriptive label - Control buttons: Added aria-labels to split, maximize, minimize, close buttons - Connection status: Added aria-live="polite" for real-time updates - All buttons: Added aria-expanded for dynamic state indication **Editor Container (editor.tsx)**: - Added role="application" with context-aware aria-label including editor type and path - Enables proper keyboard navigation and focus management **Status Bar (status-bar.tsx)**: - Converted to ARIA live region with role="status" - Added aria-live="polite" and aria-atomic="true" for status announcements - Made clear button keyboard accessible **Icon Component Enhancement (components/icon.tsx)**: - Added ARIA attribute support (role, aria-label, aria-expanded, aria-pressed, aria-live, tabIndex) - Enables Icon to be used with accessibility roles like "button" - Updated unicode and icon rendering paths to pass ARIA attributes **Testing**: - Build successful: pnpm build-dev in packages/static ✅ 🧠 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent a68d6d3 commit 2ece112

16 files changed

+795
-1306
lines changed

src/dev/ARIA.md

Lines changed: 590 additions & 1223 deletions
Large diffs are not rendered by default.

src/packages/frontend/account/account-page.tsx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,14 @@ export const AccountPage: React.FC = () => {
555555
}
556556

557557
return (
558-
<div className="smc-vfill" style={{ flexDirection: "row" }}>
559-
<div
558+
<main
559+
className="smc-vfill"
560+
style={{ flexDirection: "row" }}
561+
role="main"
562+
aria-label="Account settings"
563+
>
564+
<nav
565+
aria-label="Account settings menu"
560566
style={{
561567
background: "#00000005",
562568
borderRight: "1px solid rgba(5, 5, 5, 0.06)",
@@ -598,6 +604,7 @@ export const AccountPage: React.FC = () => {
598604
color: COLORS.GRAY_M,
599605
}}
600606
onClick={handleHideToggle}
607+
aria-label={hidden ? "Expand menu" : "Collapse menu"}
601608
icon={
602609
<Icon
603610
name={
@@ -608,9 +615,15 @@ export const AccountPage: React.FC = () => {
608615
>
609616
{hidden ? "" : "Hide"}
610617
</Button>
611-
</div>
618+
</nav>
612619
<div
613620
className="smc-vfill"
621+
role="region"
622+
aria-label={
623+
active_page === "preferences" && active_sub_tab
624+
? `${titles[active_sub_tab]?.props?.children?.[1] || active_sub_tab} settings`
625+
: `${titles[active_page]?.props?.children?.[1] || active_page} settings`
626+
}
614627
style={{
615628
overflow: "auto",
616629
paddingLeft: "15px",
@@ -627,12 +640,12 @@ export const AccountPage: React.FC = () => {
627640
: children[active_page]}
628641
<Footer />
629642
</div>
630-
</div>
643+
</main>
631644
);
632645
}
633646

634647
return (
635-
<div className="smc-vfill">
648+
<div className="smc-vfill" role="main" aria-label="Account page">
636649
{is_logged_in && !get_api_key ? (
637650
render_logged_in_view()
638651
) : (

src/packages/frontend/account/account-preferences-ai.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ export function AccountPreferencesAI() {
1212
const kucalc = useTypedRedux("customize", "kucalc");
1313

1414
return (
15-
<OtherSettings
16-
other_settings={other_settings}
17-
is_stripe_customer={
18-
!!stripe_customer?.getIn(["subscriptions", "total_count"])
19-
}
20-
kucalc={kucalc}
21-
mode="ai"
22-
/>
15+
<div role="region" aria-label="AI settings">
16+
<OtherSettings
17+
other_settings={other_settings}
18+
is_stripe_customer={
19+
!!stripe_customer?.getIn(["subscriptions", "total_count"])
20+
}
21+
kucalc={kucalc}
22+
mode="ai"
23+
/>
24+
</div>
2325
);
2426
}

src/packages/frontend/account/account-preferences-appearance.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export function AccountPreferencesAppearance() {
292292
}
293293

294294
return (
295-
<>
295+
<div role="region" aria-label="Appearance settings">
296296
{renderUserInterfacePanel()}
297297
<OtherSettings
298298
other_settings={other_settings}
@@ -311,6 +311,6 @@ export function AccountPreferencesAppearance() {
311311
font_size={font_size}
312312
/>
313313
<TerminalSettings />
314-
</>
314+
</div>
315315
);
316316
}

src/packages/frontend/account/account-preferences-communication.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,20 @@ export function AccountPreferencesCommunication(): React.JSX.Element {
114114
}
115115

116116
return (
117-
<Panel
118-
size="small"
119-
header={
120-
<>
121-
<Icon name={COMMUNICATION_ICON_NAME} />{" "}
122-
{intl.formatMessage(labels.communication)}
123-
</>
124-
}
125-
>
126-
{render_global_banner()}
127-
{render_no_free_warnings()}
128-
{render_no_email_new_messages()}
129-
</Panel>
117+
<div role="region" aria-label="Communication settings">
118+
<Panel
119+
size="small"
120+
header={
121+
<>
122+
<Icon name={COMMUNICATION_ICON_NAME} />{" "}
123+
{intl.formatMessage(labels.communication)}
124+
</>
125+
}
126+
>
127+
{render_global_banner()}
128+
{render_no_free_warnings()}
129+
{render_no_email_new_messages()}
130+
</Panel>
131+
</div>
130132
);
131133
}

src/packages/frontend/account/account-preferences-editor.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,9 @@ import { EditorSettings } from "./editor-settings/editor-settings";
1111
export const EDITOR_ICON_NAME: IconName = "edit";
1212

1313
export function AccountPreferencesEditor() {
14-
return <EditorSettings />;
14+
return (
15+
<div role="region" aria-label="Editor settings">
16+
<EditorSettings />
17+
</div>
18+
);
1519
}

src/packages/frontend/account/account-preferences-keyboard.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,9 @@ import { KeyboardSettings } from "./keyboard-settings";
1111
export const KEYBOARD_ICON_NAME: IconName = "keyboard";
1212

1313
export function AccountPreferencesKeyboard() {
14-
return <KeyboardSettings />;
14+
return (
15+
<div role="region" aria-label="Keyboard settings">
16+
<KeyboardSettings />
17+
</div>
18+
);
1519
}

src/packages/frontend/account/account-preferences-other.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ export function AccountPreferencesOther() {
1515
const kucalc = useTypedRedux("customize", "kucalc");
1616

1717
return (
18-
<OtherSettings
19-
other_settings={other_settings}
20-
is_stripe_customer={
21-
!!stripe_customer?.getIn(["subscriptions", "total_count"])
22-
}
23-
kucalc={kucalc}
24-
mode="other"
25-
/>
18+
<div role="region" aria-label="Other settings">
19+
<OtherSettings
20+
other_settings={other_settings}
21+
is_stripe_customer={
22+
!!stripe_customer?.getIn(["subscriptions", "total_count"])
23+
}
24+
kucalc={kucalc}
25+
mode="other"
26+
/>
27+
</div>
2628
);
2729
}

src/packages/frontend/account/account-preferences-profile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function AccountPreferencesProfile() {
3636
const verify_emails = useTypedRedux("customize", "verify_emails");
3737

3838
return (
39-
<>
39+
<div role="region" aria-label="Profile settings">
4040
<AccountSettings
4141
account_id={account_id}
4242
first_name={first_name}
@@ -55,6 +55,6 @@ export function AccountPreferencesProfile() {
5555
unlisted={unlisted}
5656
/>
5757
<ProfileSettings email_address={email_address} />
58-
</>
58+
</div>
5959
);
6060
}

src/packages/frontend/account/account-preferences-security.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ export function AccountPreferencesSecurity() {
2020
const ssh_gateway = useTypedRedux("customize", "ssh_gateway");
2121

2222
return (
23-
<>
23+
<div role="region" aria-label="Security settings">
2424
{(ssh_gateway || kucalc === KUCALC_COCALC_COM) && <GlobalSSHKeys />}
2525
{!is_anonymous && <ApiKeys />}
26-
</>
26+
</div>
2727
);
2828
}

0 commit comments

Comments
 (0)