Repository navigation
Feat: Declared roles and expanded state reach the platform accessibility roles (FR-71, #473) - #670
Merged
Merged
Conversation
…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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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.