@@ -1993,6 +1993,7 @@ string Truncate(string s, int max)
19931993 // ▼ when collapsed (action: click to expand down).
19941994 var chevron = effectiveExpanded ? "▲" : "▼" ;
19951995 var stepCountLabel = $ "{ stepCount } step{ ( stepCount == 1 ? "" : "s" ) } ";
1996+ var taskListHeaderAutomationName = $ "{ summaryLine } , { stepCountLabel } , { taskStatusText } , { ( effectiveExpanded ? "expanded" : "collapsed" ) } ";
19961997
19971998 Action toggleTaskList = ( ) =>
19981999 {
@@ -2004,6 +2005,7 @@ string Truncate(string s, int max)
20042005
20052006 // Per-step rows (used only when expanded).
20062007 var stepRows = new System . Collections . Generic . List < Element > ( ) ;
2008+ var stepAutomationSummaries = new System . Collections . Generic . List < string > ( ) ;
20072009 for ( int i = 0 ; i < entries . Count ; i ++ )
20082010 {
20092011 var e = entries [ i ] ;
@@ -2012,6 +2014,7 @@ string Truncate(string s, int max)
20122014 var prefix = StepPrefix ( i ) ;
20132015 var labelText = string . IsNullOrEmpty ( prefix ) ? label : $ "{ prefix } { label } ";
20142016 var summary = ShortSummary ( e ) ;
2017+ stepAutomationSummaries . Add ( string . IsNullOrEmpty ( summary ) ? labelText : $ "{ labelText } : { summary } ") ;
20152018
20162019 stepRows . Add (
20172020 ( FlexRow (
@@ -2054,19 +2057,21 @@ string Truncate(string s, int max)
20542057 . Set ( t => { t . FontSize = 11 ; } ) . VAlign ( VerticalAlignment . Center )
20552058 ) with { ColumnGap = 8 } ) . Margin ( 0 , 0 , 0 , 0 ) ;
20562059
2057- var headerButton = Button ( headerContent , toggleTaskList ) . Set ( b =>
2058- {
2059- b . HorizontalAlignment = HorizontalAlignment . Stretch ;
2060- b . HorizontalContentAlignment = HorizontalAlignment . Stretch ;
2061- b . Padding = bubblePadding ;
2062- b . CornerRadius = new CornerRadius ( bubbleRadius . TopLeft , bubbleRadius . TopRight , effectiveExpanded ? 0 : bubbleRadius . BottomRight , effectiveExpanded ? 0 : bubbleRadius . BottomLeft ) ;
2063- } ) . Resources ( r => r
2064- . Set ( "ButtonBackground" , new SolidColorBrush ( Colors . Transparent ) )
2065- . Set ( "ButtonBackgroundPointerOver" , themeBrush ( "SubtleFillColorTertiaryBrush" ) )
2066- . Set ( "ButtonBackgroundPressed" , themeBrush ( "SubtleFillColorSecondaryBrush" ) )
2067- . Set ( "ButtonBorderBrush" , new SolidColorBrush ( Colors . Transparent ) )
2068- . Set ( "ButtonBorderBrushPointerOver" , new SolidColorBrush ( Colors . Transparent ) )
2069- . Set ( "ButtonBorderBrushPressed" , new SolidColorBrush ( Colors . Transparent ) ) ) ;
2060+ var headerButton = Button ( headerContent , toggleTaskList )
2061+ . AutomationName ( taskListHeaderAutomationName )
2062+ . Set ( b =>
2063+ {
2064+ b . HorizontalAlignment = HorizontalAlignment . Stretch ;
2065+ b . HorizontalContentAlignment = HorizontalAlignment . Stretch ;
2066+ b . Padding = bubblePadding ;
2067+ b . CornerRadius = new CornerRadius ( bubbleRadius . TopLeft , bubbleRadius . TopRight , effectiveExpanded ? 0 : bubbleRadius . BottomRight , effectiveExpanded ? 0 : bubbleRadius . BottomLeft ) ;
2068+ } ) . Resources ( r => r
2069+ . Set ( "ButtonBackground" , new SolidColorBrush ( Colors . Transparent ) )
2070+ . Set ( "ButtonBackgroundPointerOver" , themeBrush ( "SubtleFillColorTertiaryBrush" ) )
2071+ . Set ( "ButtonBackgroundPressed" , themeBrush ( "SubtleFillColorSecondaryBrush" ) )
2072+ . Set ( "ButtonBorderBrush" , new SolidColorBrush ( Colors . Transparent ) )
2073+ . Set ( "ButtonBorderBrushPointerOver" , new SolidColorBrush ( Colors . Transparent ) )
2074+ . Set ( "ButtonBorderBrushPressed" , new SolidColorBrush ( Colors . Transparent ) ) ) ;
20702075
20712076 var cardChildren = new System . Collections . Generic . List < Element > { headerButton } ;
20722077 if ( effectiveExpanded )
@@ -2075,6 +2080,7 @@ string Truncate(string s, int max)
20752080 // header + body read as one unit but the divide is clear.
20762081 cardChildren . Add (
20772082 Border ( VStack ( 8 , stepRows . ToArray ( ) ) )
2083+ . AutomationName ( $ "Tool steps for: { summaryLine } . { string . Join ( "; " , stepAutomationSummaries ) } ")
20782084 . Set ( b =>
20792085 {
20802086 b . Padding = bubblePadding ;
0 commit comments