Skip to content

Feat: Declared roles and expanded state reach the platform accessibility roles (FR-71, #473) - #670

Merged
b-re-w merged 1 commit into
developfrom
feat/473-platform-roles
Nov 13, 2026
Merged

b-re-w merged 1 commit into
developfrom
feat/473-platform-roles

Conversation

@b-re-w

@b-re-w b-re-w commented Nov 13, 2026

Copy link
Copy Markdown
Member

Closes #473 (stage 2, after #489 and #585), on the window pin from #617 (fork #201).

  • AppKitAccessibility.kt (shared by AppKit, X11 and Win32 on GraalVM and Kotlin/Native) maps the 11 FR-71 roles Compose has no name for to the fork's ElementRole: TabList TAB_GROUP, Tree OUTLINE, TreeItem OUTLINE_ROW, Menu MENU, MenuItem MENU_ITEM, List LIST, ListItem LIST_ITEM, Navigation NAVIGATION, TextBox FIELD, Heading HEADING, Group GROUP. A declared role beats the guess from other properties; Compose-named roles still go through Compose.
  • Expanded state: closed sends EXPANDABLE, open EXPANDABLE + EXPANDED, unset neither. FR-71 has no expand/collapse action bits, so the fork's EXPAND/COLLAPSE actions are not offered.
  • A node with a role and no name is kept with that role (was dropped); state-only nodes are kept as GROUP.
  • The platform value text no longer repeats the role word or expanded/collapsed. Paths without native roles (Android, iOS, dev shell) keep the state-description words.

Tests (PlatformRoleTest): fr71_platform_role_every_role_compose_cannot_name_has_the_platforms_own, fr71_platform_role_reaches_the_window_for_every_new_role, fr71_platform_role_a_node_with_a_role_and_no_name_is_kept, fr71_platform_role_a_node_with_neither_role_nor_name_is_still_left_out, fr71_expanded_state_reaches_the_platform. Local: PlatformRoleTest + AccessibilityModifierTest 26/26. The Kotlin/Native Linux and Windows renderers compile in CI. Screen-reader checks (VoiceOver, NVDA/Narrator, Orca) are on the owner list.

…n words (FR-71, #473)

The window glue used to drop a node that had a role and no name, and every
role Compose has no name for reached the platform only as a word in the
state description. The pinned fork window modules now carry the platform
roles and the expandable and expanded states, so the renderer hands them
over directly:

- TabList, Tree, TreeItem, Menu, MenuItem, List, ListItem and Navigation
  become TAB_GROUP, OUTLINE, OUTLINE_ROW, MENU, MENU_ITEM, LIST, LIST_ITEM
  and NAVIGATION; TextBox is a FIELD, Heading a HEADING, Group a GROUP.
- The declared expanded state becomes EXPANDABLE, plus EXPANDED when open.
- A node with a declared role and no name is kept, with that role.
- The role word and the expanded word are left out of the value the
  platform reads, since the platform now says both itself. Readers on other
  paths still get them through the state description.

The role and expanded state travel in two renderer semantics keys that do
not merge into a parent. FR-71 defines no expand or collapse action bits,
so no wire bits were added and the fork's EXPAND and COLLAPSE actions are
not offered.

Covers FR-71 stage 2 (platform roles) on the renderer side. Tests:
PlatformRoleTest (fr71_platform_role_*, fr71_expanded_state_reaches_the_platform).
@b-re-w
b-re-w merged commit 855e81b into develop Nov 13, 2026
@b-re-w
b-re-w deleted the feat/473-platform-roles branch November 13, 2026 03:48
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