b52c9ca0 by Ean Schuessler

Remove truncation from ARIA mode - show all rows, links, actions

ARIA mode was truncating grid rows to 3, links to 10, and actions to 15.
This caused models to miss important data (e.g., only seeing 3 of 8 features
or 3 of 16 variant associations).

Now ARIA mode shows complete data like text mode does.
1 parent c4610d5e
...@@ -947,10 +947,10 @@ def convertToAriaTree = { semanticState, targetScreenPath -> ...@@ -947,10 +947,10 @@ def convertToAriaTree = { semanticState, targetScreenPath ->
947 def columns = formData.fields?.collect { it.title ?: it.name } 947 def columns = formData.fields?.collect { it.title ?: it.name }
948 if (columns) gridNode.columns = columns 948 if (columns) gridNode.columns = columns
949 949
950 // Add sample rows with more detail 950 // Add all rows with detail (no truncation - model needs complete data)
951 if (listData instanceof List && listData.size() > 0) { 951 if (listData instanceof List && listData.size() > 0) {
952 gridNode.children = [] 952 gridNode.children = []
953 listData.take(3).each { row -> 953 listData.each { row ->
954 def rowNode = [role: "row"] 954 def rowNode = [role: "row"]
955 // Extract key identifying info 955 // Extract key identifying info
956 def id = row.pseudoId ?: row.partyId ?: row.productId ?: row.id 956 def id = row.pseudoId ?: row.partyId ?: row.productId ?: row.id
...@@ -960,39 +960,33 @@ def convertToAriaTree = { semanticState, targetScreenPath -> ...@@ -960,39 +960,33 @@ def convertToAriaTree = { semanticState, targetScreenPath ->
960 if (id && name && id != name) rowNode.description = id 960 if (id && name && id != name) rowNode.description = id
961 gridNode.children << rowNode 961 gridNode.children << rowNode
962 } 962 }
963 if (listData.size() > 3) {
964 gridNode.moreRows = listData.size() - 3
965 }
966 } 963 }
967 964
968 children << gridNode 965 children << gridNode
969 } 966 }
970 967
971 // Process navigation links 968 // Process navigation links (no truncation)
972 def navLinks = semanticState.data?.links?.findAll { it.type == "navigation" } 969 def navLinks = semanticState.data?.links?.findAll { it.type == "navigation" }
973 if (navLinks && navLinks.size() > 0) { 970 if (navLinks && navLinks.size() > 0) {
974 def navNode = [ 971 def navNode = [
975 role: "navigation", 972 role: "navigation",
976 name: "Links", 973 name: "Links",
977 children: navLinks.take(10).collect { link -> 974 children: navLinks.collect { link ->
978 def linkNode = [role: "link", name: link.text, ref: link.path] 975 def linkNode = [role: "link", name: link.text, ref: link.path]
979 linkNode 976 linkNode
980 } 977 }
981 ] 978 ]
982 if (navLinks.size() > 10) {
983 navNode.moreLinks = navLinks.size() - 10
984 }
985 children << navNode 979 children << navNode
986 } 980 }
987 981
988 // Process ALL actions as buttons (unified - no separate transitions/actions) 982 // Process ALL actions as buttons (unified - no separate transitions/actions, no truncation)
989 def allActions = semanticState.actions ?: [] 983 def allActions = semanticState.actions ?: []
990 if (allActions && allActions.size() > 0) { 984 if (allActions && allActions.size() > 0) {
991 def toolbarNode = [ 985 def toolbarNode = [
992 role: "toolbar", 986 role: "toolbar",
993 name: "Actions", 987 name: "Actions",
994 description: "Available operations on this screen", 988 description: "Available operations on this screen",
995 children: allActions.take(15).collect { action -> 989 children: allActions.collect { action ->
996 def btnNode = [ 990 def btnNode = [
997 role: "button", 991 role: "button",
998 name: action.name, 992 name: action.name,
...@@ -1016,9 +1010,6 @@ def convertToAriaTree = { semanticState, targetScreenPath -> ...@@ -1016,9 +1010,6 @@ def convertToAriaTree = { semanticState, targetScreenPath ->
1016 btnNode 1010 btnNode
1017 } 1011 }
1018 ] 1012 ]
1019 if (allActions.size() > 15) {
1020 toolbarNode.moreActions = allActions.size() - 15
1021 }
1022 children << toolbarNode 1013 children << toolbarNode
1023 } 1014 }
1024 1015
......