@@ -32,7 +32,6 @@ interface ITodoListTemplate {
3232 readonly todoElement : HTMLElement ;
3333 readonly statusIcon : HTMLElement ;
3434 readonly iconLabel : IconLabel ;
35- readonly statusElement : HTMLElement ;
3635}
3736
3837class TodoListRenderer implements IListRenderer < IChatTodo , ITodoListTemplate > {
@@ -53,18 +52,12 @@ class TodoListRenderer implements IListRenderer<IChatTodo, ITodoListTemplate> {
5352
5453 const todoContent = dom . append ( todoElement , dom . $ ( '.todo-content' ) ) ;
5554 const iconLabel = templateDisposables . add ( new IconLabel ( todoContent , { supportIcons : false } ) ) ;
56- const statusElement = dom . append ( todoContent , dom . $ ( '.todo-status-text' ) ) ;
57- statusElement . style . position = 'absolute' ;
58- statusElement . style . left = '-10000px' ;
59- statusElement . style . width = '1px' ;
60- statusElement . style . height = '1px' ;
61- statusElement . style . overflow = 'hidden' ;
62-
63- return { templateDisposables, todoElement, statusIcon, iconLabel, statusElement } ;
55+
56+ return { templateDisposables, todoElement, statusIcon, iconLabel } ;
6457 }
6558
6659 renderElement ( todo : IChatTodo , index : number , templateData : ITodoListTemplate ) : void {
67- const { todoElement, statusIcon, iconLabel, statusElement } = templateData ;
60+ const { todoElement, statusIcon, iconLabel } = templateData ;
6861
6962 // Update status icon
7063 statusIcon . className = `todo-status-icon codicon ${ this . getStatusIconClass ( todo . status ) } ` ;
@@ -75,17 +68,12 @@ class TodoListRenderer implements IListRenderer<IChatTodo, ITodoListTemplate> {
7568 const title = includeDescription && todo . description && todo . description . trim ( ) ? todo . description : undefined ;
7669 iconLabel . setLabel ( todo . title , undefined , { title } ) ;
7770
78- // Update hidden status text for screen readers
79- const statusText = this . getStatusText ( todo . status ) ;
80- statusElement . id = `todo-status-${ index } ` ;
81- statusElement . textContent = statusText ;
82-
8371 // Update aria-label
72+ const statusText = this . getStatusText ( todo . status ) ;
8473 const ariaLabel = includeDescription && todo . description && todo . description . trim ( )
8574 ? localize ( 'chat.todoList.itemWithDescription' , '{0}, {1}, {2}' , todo . title , statusText , todo . description )
8675 : localize ( 'chat.todoList.item' , '{0}, {1}' , todo . title , statusText ) ;
8776 todoElement . setAttribute ( 'aria-label' , ariaLabel ) ;
88- todoElement . setAttribute ( 'aria-describedby' , `todo-status-${ index } ` ) ;
8977 }
9078
9179 disposeTemplate ( templateData : ITodoListTemplate ) : void {
0 commit comments