@@ -103,14 +103,19 @@ const Sidebar = ({
103
103
< div className = "p-4 flex-1 overflow-auto" >
104
104
< div className = "space-y-4" >
105
105
< div className = "space-y-2" >
106
- < label className = "text-sm font-medium" > Transport Type</ label >
106
+ < label
107
+ className = "text-sm font-medium"
108
+ htmlFor = "transport-type-select"
109
+ >
110
+ Transport Type
111
+ </ label >
107
112
< Select
108
113
value = { transportType }
109
114
onValueChange = { ( value : "stdio" | "sse" ) =>
110
115
setTransportType ( value )
111
116
}
112
117
>
113
- < SelectTrigger >
118
+ < SelectTrigger id = "transport-type-select" >
114
119
< SelectValue placeholder = "Select transport type" />
115
120
</ SelectTrigger >
116
121
< SelectContent >
@@ -123,17 +128,26 @@ const Sidebar = ({
123
128
{ transportType === "stdio" ? (
124
129
< >
125
130
< div className = "space-y-2" >
126
- < label className = "text-sm font-medium" > Command</ label >
131
+ < label className = "text-sm font-medium" htmlFor = "command-input" >
132
+ Command
133
+ </ label >
127
134
< Input
135
+ id = "command-input"
128
136
placeholder = "Command"
129
137
value = { command }
130
138
onChange = { ( e ) => setCommand ( e . target . value ) }
131
139
className = "font-mono"
132
140
/>
133
141
</ div >
134
142
< div className = "space-y-2" >
135
- < label className = "text-sm font-medium" > Arguments</ label >
143
+ < label
144
+ className = "text-sm font-medium"
145
+ htmlFor = "arguments-input"
146
+ >
147
+ Arguments
148
+ </ label >
136
149
< Input
150
+ id = "arguments-input"
137
151
placeholder = "Arguments (space-separated)"
138
152
value = { args }
139
153
onChange = { ( e ) => setArgs ( e . target . value ) }
@@ -144,8 +158,11 @@ const Sidebar = ({
144
158
) : (
145
159
< >
146
160
< div className = "space-y-2" >
147
- < label className = "text-sm font-medium" > URL</ label >
161
+ < label className = "text-sm font-medium" htmlFor = "sse-url-input" >
162
+ URL
163
+ </ label >
148
164
< Input
165
+ id = "sse-url-input"
149
166
placeholder = "URL"
150
167
value = { sseUrl }
151
168
onChange = { ( e ) => setSseUrl ( e . target . value ) }
@@ -157,6 +174,7 @@ const Sidebar = ({
157
174
variant = "outline"
158
175
onClick = { ( ) => setShowBearerToken ( ! showBearerToken ) }
159
176
className = "flex items-center w-full"
177
+ aria-expanded = { showBearerToken }
160
178
>
161
179
{ showBearerToken ? (
162
180
< ChevronDown className = "w-4 h-4 mr-2" />
@@ -167,8 +185,14 @@ const Sidebar = ({
167
185
</ Button >
168
186
{ showBearerToken && (
169
187
< div className = "space-y-2" >
170
- < label className = "text-sm font-medium" > Bearer Token</ label >
188
+ < label
189
+ className = "text-sm font-medium"
190
+ htmlFor = "bearer-token-input"
191
+ >
192
+ Bearer Token
193
+ </ label >
171
194
< Input
195
+ id = "bearer-token-input"
172
196
placeholder = "Bearer Token"
173
197
value = { bearerToken }
174
198
onChange = { ( e ) => setBearerToken ( e . target . value ) }
@@ -187,6 +211,7 @@ const Sidebar = ({
187
211
onClick = { ( ) => setShowEnvVars ( ! showEnvVars ) }
188
212
className = "flex items-center w-full"
189
213
data-testid = "env-vars-button"
214
+ aria-expanded = { showEnvVars }
190
215
>
191
216
{ showEnvVars ? (
192
217
< ChevronDown className = "w-4 h-4 mr-2" />
@@ -201,6 +226,7 @@ const Sidebar = ({
201
226
< div key = { idx } className = "space-y-2 pb-4" >
202
227
< div className = "flex gap-2" >
203
228
< Input
229
+ aria-label = { `Environment variable key ${ idx + 1 } ` }
204
230
placeholder = "Key"
205
231
value = { key }
206
232
onChange = { ( e ) => {
@@ -243,6 +269,7 @@ const Sidebar = ({
243
269
</ div >
244
270
< div className = "flex gap-2" >
245
271
< Input
272
+ aria-label = { `Environment variable value ${ idx + 1 } ` }
246
273
type = { shownEnvVars . has ( key ) ? "text" : "password" }
247
274
placeholder = "Value"
248
275
value = { value }
@@ -309,6 +336,7 @@ const Sidebar = ({
309
336
onClick = { ( ) => setShowConfig ( ! showConfig ) }
310
337
className = "flex items-center w-full"
311
338
data-testid = "config-button"
339
+ aria-expanded = { showConfig }
312
340
>
313
341
{ showConfig ? (
314
342
< ChevronDown className = "w-4 h-4 mr-2" />
@@ -325,7 +353,10 @@ const Sidebar = ({
325
353
return (
326
354
< div key = { key } className = "space-y-2" >
327
355
< div className = "flex items-center gap-1" >
328
- < label className = "text-sm font-medium text-green-600" >
356
+ < label
357
+ className = "text-sm font-medium text-green-600"
358
+ htmlFor = { `${ configKey } -input` }
359
+ >
329
360
{ configKey }
330
361
</ label >
331
362
< Tooltip >
@@ -339,6 +370,7 @@ const Sidebar = ({
339
370
</ div >
340
371
{ typeof configItem . value === "number" ? (
341
372
< Input
373
+ id = { `${ configKey } -input` }
342
374
type = "number"
343
375
data-testid = { `${ configKey } -input` }
344
376
value = { configItem . value }
@@ -365,7 +397,7 @@ const Sidebar = ({
365
397
setConfig ( newConfig ) ;
366
398
} }
367
399
>
368
- < SelectTrigger >
400
+ < SelectTrigger id = { ` ${ configKey } -input` } >
369
401
< SelectValue />
370
402
</ SelectTrigger >
371
403
< SelectContent >
@@ -375,6 +407,7 @@ const Sidebar = ({
375
407
</ Select >
376
408
) : (
377
409
< Input
410
+ id = { `${ configKey } -input` }
378
411
data-testid = { `${ configKey } -input` }
379
412
value = { configItem . value }
380
413
onChange = { ( e ) => {
@@ -448,14 +481,19 @@ const Sidebar = ({
448
481
449
482
{ loggingSupported && connectionStatus === "connected" && (
450
483
< div className = "space-y-2" >
451
- < label className = "text-sm font-medium" > Logging Level</ label >
484
+ < label
485
+ className = "text-sm font-medium"
486
+ htmlFor = "logging-level-select"
487
+ >
488
+ Logging Level
489
+ </ label >
452
490
< Select
453
491
value = { logLevel }
454
492
onValueChange = { ( value : LoggingLevel ) =>
455
493
sendLogLevelRequest ( value )
456
494
}
457
495
>
458
- < SelectTrigger >
496
+ < SelectTrigger id = "logging-level-select" >
459
497
< SelectValue placeholder = "Select logging level" />
460
498
</ SelectTrigger >
461
499
< SelectContent >
0 commit comments