Skip to content

fix(client): put the settings footer links in the AccessKit tree (UI/UX v3 P4d) - #97

Merged
mizu-jun merged 1 commit into
masterfrom
p4d-footer-link-a11y
Aug 29, 2026
Merged

fix(client): put the settings footer links in the AccessKit tree (UI/UX v3 P4d)#97
mizu-jun merged 1 commit into
masterfrom
p4d-footer-link-a11y

Conversation

@mizu-jun

Copy link
Copy Markdown
Owner

The defect

Measuring for #96 turned this up: accessibility.rs did not mention settings-open-config-file or settings-reset-category anywhere. The settings panel's two footer actions — open config.toml, reset the current category — were reachable by mouse and by nothing else. A screen-reader user could not perform either.

It was kept out of #96 deliberately: that PR was typography and hit-region geometry, and this is a P6c-shaped accessibility gap.

The fix

Both links become Role::Button nodes — SETTINGS_FOOTER_OPEN_ID (31) and SETTINGS_FOOTER_RESET_ID (32), taken from the id block the hand-written settings fields vacated in P1b/P1c — and children of the panel dialog beside the content group, which is where they sit on screen.

Button rather than Link: both perform an action rather than navigate, and "Open config.toml" hands off to the OS editor.

Three things the fix pins:

  • The label is the link's text without its glyph. footer::open_text() / reset_text() are the bare localised strings, and the drawn labels are format!("↗ {}", open_text()) — so a reworded link cannot say one thing on screen and another out loud. / are a visual affordance; reading them aloud before every activation is noise.
  • The reset node exists only while category_resettable(). The renderer omits the link for the list-based categories (SSH / Keybindings / Profiles), where a reset would delete user data; announcing a control that is not drawn would be a worse defect than the omission being fixed. The tree hash already covers the transition — it hashes category.label(), and resettability is a function of the category.
  • Click performs the same two actions the mouse arm does (platform::open_config_file() / reset_category_to_defaults() + redraw), guarded on the panel being open so a stale activation cannot open an editor or reset a category behind the user's back.

Also corrects the node-id range table, which still described 28..30 as "reserved" after P6c took them for the InfoBar slots.

Verification

  • cargo fmt --check — clean
  • cargo clippy --workspace --all-targets -- -D warnings — no warnings
  • cargo test --workspace — 28 suites pass; 3 new tests (both links present as panel children with a Click action; no reset node for any of the three non-resettable categories; labels equal footer::open_text() / reset_text() and carry no glyph) plus decode round-trips for the two new ids
  • Not covered: a real screen-reader pass. The tree is asserted, not heard.

Stacked on #96 (merged); the diff here is P4d only.

🤖 Generated with Claude Code

…/UX v3 P4d)

Measuring for P4c turned up that neither footer link had ever been in the
accessibility tree: `accessibility.rs` did not mention `settings-open-config-file`
or `settings-reset-category` anywhere, so a screen-reader user could not open
`config.toml` or reset a category at all. The links were reachable by mouse and
by nothing else.

Both are now `Role::Button` nodes — `SETTINGS_FOOTER_OPEN_ID` (31) and
`SETTINGS_FOOTER_RESET_ID` (32), from the id block the hand-written settings
fields vacated in P1b/P1c — and children of the panel dialog beside the content
group, which is where they sit on screen. Button rather than Link: both perform
an action rather than navigate, and "Open config.toml" hands off to the OS
editor.

- The announced label is the link's text without its `↗` / `↺` glyph.
  `footer::open_text()` / `reset_text()` are the bare localised strings and the
  drawn labels are built from them, so a reworded link cannot say one thing on
  screen and another out loud.
- The reset node exists only while `category_resettable()`. Announcing a control
  the renderer does not draw would be worse than the omission being fixed. The
  tree hash already covers it: it hashes `category.label()`, and resettability
  is a function of the category.
- `Click` performs the same two actions the mouse arm does, guarded on the panel
  being open so a stale activation cannot open an editor or reset a category
  behind the user's back.

Also corrects the node-id range table, which still described 28..30 as reserved
after P6c took them for the InfoBar slots.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@mizu-jun
mizu-jun merged commit f2c22b0 into master Aug 29, 2026
13 checks passed
@github-actions

Copy link
Copy Markdown

Coverage report


Generated by cargo llvm-cov (workspace minus nexterm-client-gpu and nexterm-i18n).

@mizu-jun
mizu-jun deleted the p4d-footer-link-a11y branch August 29, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant