Expand description
Host-neutral accessibility descriptors keyed by SurfaceId.
Provides a portable contract every Graphshell host can honor for AccessKit instrumentation. The vendored iced fork doesn’t yet expose AccessKit hooks through its widget tree; this module’s job is to lock the shape in regardless — the descriptor lookup is addressable today (tests assert completeness), and a future host integration (or a future iced version that gains AccessKit support) renders descriptors into AccessKit nodes via this single lookup.
§Design choices
- AccessKit roles directly. No bespoke role enum — we adopt
accesskit::Roleso future hosts that wire AccessKit don’t have to translate. AccessKit is the de-facto cross-platform a11y layer (used by egui, winit, GTK, AT-SPI, UI Automation, NSAccessibility). - Keyed by
SurfaceId, not stored on widgets. Widgets stayFrom<T>-conversion-shaped (no need to add.label(...)builders to every gs widget). The descriptor lookup is the single source of truth — change the role once, every host picks it up. - Static const-ish data.
descriptor_foris a pure function overSurfaceId. Hosts can call it from anywhere without threading a registry.
§Slice 24 status
This module ships the lookup + tests. Iced does not render the
descriptors today (iced’s vendored fork has no AccessKit hooks).
When that gap closes, the integration is one place: the iced
widget conversions emit AccessKit nodes built from
descriptor_for(surface_id). Future hosts (egui, Stage-G/H) do
the same against their respective AccessKit bridges.
Structs§
- Accessibility
Descriptor - A surface’s accessibility metadata. Carries the AccessKit role
plus the visible label, an optional longer description (used as
the AccessKit
descriptionfield — read by screen readers when the user dwells on the surface), and an optional keyboard-shortcut hint surfaced both visually and as the AccessKitkeyboard_shortcutsfield so AT users can discover the binding.
Enums§
- Surface
Id - Identifier for a chrome surface that emits UX events. Adding a new surface (e.g., a future “Inspector” pane) is one new variant here and one new emission site at the surface’s open/dismiss seams.
Functions§
- descriptor_
for - The canonical descriptor for a surface. Pure function over
SurfaceId; the result is the single source of truth every host renders identically.