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(
78
78
if ( Array . isArray ( value ) ) {
79
79
const files = value ;
80
80
return (
81
- < FileContainer key = { key } >
81
+ < FileContainer key = { key } role = "tree" >
82
82
{ files . map ( ( file ) => {
83
83
return (
84
84
< File
85
+ role = "treeitem"
85
86
key = { `FILE-${ file . fileName } -${ index } -${ Math . random ( )
86
87
. toString ( )
87
88
. substring ( 2 , 10 ) } `}
@@ -110,7 +111,11 @@ function renderFileList(
110
111
📁 < span style = { { marginLeft : 4 , fontSize : 15 } } > { key } </ span >
111
112
</ p >
112
113
</ CheckboxContainer >
113
- < Checkbox id = { `CHECKBOX-${ index } -${ key } ` } type = "checkbox" />
114
+ < Checkbox
115
+ id = { `CHECKBOX-${ index } -${ key } ` }
116
+ type = "checkbox"
117
+ role = "checkbox"
118
+ />
114
119
{ renderFileList (
115
120
value as FileList ,
116
121
handleFileClick ,
You can’t perform that action at this time.
0 commit comments