File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/react-toggle-file-tree/src/toggle-file-tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,11 @@ function renderFileList(
7878 if ( Array . isArray ( value ) ) {
7979 const files = value ;
8080 return (
81- < FileContainer key = { key } >
81+ < FileContainer key = { key } role = "tree" >
8282 { files . map ( ( file ) => {
8383 return (
8484 < File
85+ role = "treeitem"
8586 key = { `FILE-${ file . fileName } -${ index } -${ Math . random ( )
8687 . toString ( )
8788 . substring ( 2 , 10 ) } `}
@@ -110,7 +111,11 @@ function renderFileList(
110111 📁 < span style = { { marginLeft : 4 , fontSize : 15 } } > { key } </ span >
111112 </ p >
112113 </ CheckboxContainer >
113- < Checkbox id = { `CHECKBOX-${ index } -${ key } ` } type = "checkbox" />
114+ < Checkbox
115+ id = { `CHECKBOX-${ index } -${ key } ` }
116+ type = "checkbox"
117+ role = "checkbox"
118+ />
114119 { renderFileList (
115120 value as FileList ,
116121 handleFileClick ,
You can’t perform that action at this time.
0 commit comments