File tree Expand file tree Collapse file tree 3 files changed +23
-6
lines changed
Expand file tree Collapse file tree 3 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -499,8 +499,12 @@ export function DataField(props: DataFieldProps) {
499499 ) ;
500500}
501501
502- export function SecretField ( props : InputProps ) {
503- const { value, ...other } = props ;
502+ export interface SecretFieldProps extends InputProps {
503+ nameID ?: string ;
504+ }
505+
506+ export function SecretField ( props : SecretFieldProps ) {
507+ const { value, nameID, ...other } = props ;
504508 const [ showPassword , setShowPassword ] = React . useState ( false ) ;
505509 const [ copied , setCopied ] = React . useState ( false ) ;
506510 const { t } = useTranslation ( ) ;
@@ -555,6 +559,7 @@ export function SecretField(props: InputProps) {
555559 </ Grid >
556560 < Grid item xs >
557561 < Input
562+ aria-labelledby = { nameID }
558563 readOnly = { ! showPassword }
559564 type = "password"
560565 fullWidth
Original file line number Diff line number Diff line change @@ -100,12 +100,18 @@ export default function SecretDetails(props: {
100100 lastDataRef . current = _ . cloneDeep ( data ) ;
101101 } ;
102102
103- const mainRows : NameValueTableRow [ ] = Object . entries ( data ) . map ( ( item : unknown [ ] ) => ( {
104- name : item [ 0 ] as string ,
103+ const mainRows : NameValueTableRow [ ] = (
104+ Object . entries ( data ) as [ string , unknown ] [ ]
105+ ) . map ( ( [ key , val ] ) => ( {
106+ name : key ,
107+ nameID : key ,
105108 value : (
106109 < SecretField
107- value = { item [ 1 ] }
108- onChange = { e => handleFieldChange ( item [ 0 ] as string , e . target . value ) }
110+ value = { val }
111+ nameID = { key }
112+ onChange = { ( e : React . ChangeEvent < HTMLInputElement | HTMLTextAreaElement > ) =>
113+ handleFieldChange ( key , e . target . value )
114+ }
109115 />
110116 ) ,
111117 } ) ) ;
Original file line number Diff line number Diff line change 234234 >
235235 <dt
236236 class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-4 css-1iczkge-MuiGrid-root"
237+ id="storageClassName"
237238 >
238239 storageClassName
239240 </dt>
272273 class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-true css-1z0dvx8-MuiGrid-root"
273274 >
274275 <div
276+ aria-labelledby="storageClassName"
275277 class="MuiInputBase-root MuiInput-root MuiInput-underline MuiInputBase-colorPrimary MuiInputBase-fullWidth Mui-readOnly MuiInputBase-readOnly css-zam05p-MuiInputBase-root-MuiInput-root"
276278 >
277279 <input
286288 </dd>
287289 <dt
288290 class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-4 css-1iczkge-MuiGrid-root"
291+ id="volumeMode"
289292 >
290293 volumeMode
291294 </dt>
324327 class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-true css-1z0dvx8-MuiGrid-root"
325328 >
326329 <div
330+ aria-labelledby="volumeMode"
327331 class="MuiInputBase-root MuiInput-root MuiInput-underline MuiInputBase-colorPrimary MuiInputBase-fullWidth Mui-readOnly MuiInputBase-readOnly css-zam05p-MuiInputBase-root-MuiInput-root"
328332 >
329333 <input
338342 </dd>
339343 <dt
340344 class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-4 css-iqixpy-MuiGrid-root"
345+ id="volumeName"
341346 >
342347 volumeName
343348 </dt>
376381 class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-true css-1z0dvx8-MuiGrid-root"
377382 >
378383 <div
384+ aria-labelledby="volumeName"
379385 class="MuiInputBase-root MuiInput-root MuiInput-underline MuiInputBase-colorPrimary MuiInputBase-fullWidth Mui-readOnly MuiInputBase-readOnly css-zam05p-MuiInputBase-root-MuiInput-root"
380386 >
381387 <input
You can’t perform that action at this time.
0 commit comments