mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-04-23 18:14:19 +01:00
fixed input parameter keyboard accessibility issue (#1071)
* fixed input parameter keyboard accessibility issue * Fixed autofocus and role issue * make autofocus on close button
This commit is contained in:
parent
3032f689b6
commit
38c3761260
src/Explorer/Panes/ExecuteSprocParamsPane
@ -153,7 +153,7 @@ export const ExecuteSprocParamsPane: FunctionComponent<ExecuteSprocParamsPanePro
|
|||||||
selectedKey={paramKeyValue && paramKeyValue.key}
|
selectedKey={paramKeyValue && paramKeyValue.key}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
<Stack horizontal onClick={addNewParamAtLastIndex}>
|
<Stack horizontal onClick={addNewParamAtLastIndex} tabIndex={0}>
|
||||||
<Image {...imageProps} src={AddPropertyIcon} alt="Add param" />
|
<Image {...imageProps} src={AddPropertyIcon} alt="Add param" />
|
||||||
<Text className="addNewParamStyle">Add New Param</Text>
|
<Text className="addNewParamStyle">Add New Param</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
@ -59,30 +59,36 @@ export const InputParameter: FunctionComponent<InputParameterProps> = ({
|
|||||||
onChange={onParamKeyChange}
|
onChange={onParamKeyChange}
|
||||||
options={options}
|
options={options}
|
||||||
styles={dropdownStyles}
|
styles={dropdownStyles}
|
||||||
|
tabIndex={0}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
label={inputLabel && inputLabel}
|
label={inputLabel && inputLabel}
|
||||||
id="confirmCollectionId"
|
id="confirmCollectionId"
|
||||||
autoFocus
|
|
||||||
value={paramValue}
|
value={paramValue}
|
||||||
onChange={onParamValueChange}
|
onChange={onParamValueChange}
|
||||||
/>
|
/>
|
||||||
{isAddRemoveVisible && (
|
{isAddRemoveVisible && (
|
||||||
<>
|
<>
|
||||||
|
<div tabIndex={0}>
|
||||||
<Image
|
<Image
|
||||||
{...imageProps}
|
{...imageProps}
|
||||||
src={EntityCancelIcon}
|
src={EntityCancelIcon}
|
||||||
alt="Delete param"
|
alt="Delete param"
|
||||||
id="deleteparam"
|
id="deleteparam"
|
||||||
|
role="button"
|
||||||
onClick={onDeleteParamKeyPress}
|
onClick={onDeleteParamKeyPress}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
<div tabIndex={0}>
|
||||||
<Image
|
<Image
|
||||||
{...imageProps}
|
{...imageProps}
|
||||||
src={AddPropertyIcon}
|
src={AddPropertyIcon}
|
||||||
alt="Add param"
|
alt="Add param"
|
||||||
id="addparam"
|
id="addparam"
|
||||||
|
role="button"
|
||||||
onClick={onAddNewParamKeyPress}
|
onClick={onAddNewParamKeyPress}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
@ -345,6 +345,7 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
<DropdownBase
|
<DropdownBase
|
||||||
label="Key"
|
label="Key"
|
||||||
@ -363,6 +364,7 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
}
|
}
|
||||||
selectedKey="string"
|
selectedKey="string"
|
||||||
styles={[Function]}
|
styles={[Function]}
|
||||||
|
tabIndex={0}
|
||||||
theme={
|
theme={
|
||||||
Object {
|
Object {
|
||||||
"disableGlobalClassNames": false,
|
"disableGlobalClassNames": false,
|
||||||
@ -664,6 +666,7 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
responsiveMode={3}
|
responsiveMode={3}
|
||||||
selectedKey="string"
|
selectedKey="string"
|
||||||
styles={[Function]}
|
styles={[Function]}
|
||||||
|
tabIndex={0}
|
||||||
theme={
|
theme={
|
||||||
Object {
|
Object {
|
||||||
"disableGlobalClassNames": false,
|
"disableGlobalClassNames": false,
|
||||||
@ -1562,14 +1565,12 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
</DropdownBase>
|
</DropdownBase>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<StyledTextFieldBase
|
<StyledTextFieldBase
|
||||||
autoFocus={true}
|
|
||||||
id="confirmCollectionId"
|
id="confirmCollectionId"
|
||||||
key=".0:$.1"
|
key=".0:$.1"
|
||||||
label="Value"
|
label="Value"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
>
|
>
|
||||||
<TextFieldBase
|
<TextFieldBase
|
||||||
autoFocus={true}
|
|
||||||
deferredValidationTime={200}
|
deferredValidationTime={200}
|
||||||
id="confirmCollectionId"
|
id="confirmCollectionId"
|
||||||
label="Value"
|
label="Value"
|
||||||
@ -2155,7 +2156,6 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
<input
|
<input
|
||||||
aria-invalid={false}
|
aria-invalid={false}
|
||||||
aria-labelledby="TextFieldLabel3"
|
aria-labelledby="TextFieldLabel3"
|
||||||
autoFocus={true}
|
|
||||||
className="ms-TextField-field field-77"
|
className="ms-TextField-field field-77"
|
||||||
id="confirmCollectionId"
|
id="confirmCollectionId"
|
||||||
onBlur={[Function]}
|
onBlur={[Function]}
|
||||||
@ -2500,6 +2500,7 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
<DropdownBase
|
<DropdownBase
|
||||||
label="Key"
|
label="Key"
|
||||||
@ -2518,6 +2519,7 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
}
|
}
|
||||||
selectedKey="string"
|
selectedKey="string"
|
||||||
styles={[Function]}
|
styles={[Function]}
|
||||||
|
tabIndex={0}
|
||||||
theme={
|
theme={
|
||||||
Object {
|
Object {
|
||||||
"disableGlobalClassNames": false,
|
"disableGlobalClassNames": false,
|
||||||
@ -2819,6 +2821,7 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
responsiveMode={3}
|
responsiveMode={3}
|
||||||
selectedKey="string"
|
selectedKey="string"
|
||||||
styles={[Function]}
|
styles={[Function]}
|
||||||
|
tabIndex={0}
|
||||||
theme={
|
theme={
|
||||||
Object {
|
Object {
|
||||||
"disableGlobalClassNames": false,
|
"disableGlobalClassNames": false,
|
||||||
@ -3717,7 +3720,6 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
</DropdownBase>
|
</DropdownBase>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<StyledTextFieldBase
|
<StyledTextFieldBase
|
||||||
autoFocus={true}
|
|
||||||
id="confirmCollectionId"
|
id="confirmCollectionId"
|
||||||
key=".0:$.1"
|
key=".0:$.1"
|
||||||
label="Param"
|
label="Param"
|
||||||
@ -3725,7 +3727,6 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
value=""
|
value=""
|
||||||
>
|
>
|
||||||
<TextFieldBase
|
<TextFieldBase
|
||||||
autoFocus={true}
|
|
||||||
deferredValidationTime={200}
|
deferredValidationTime={200}
|
||||||
id="confirmCollectionId"
|
id="confirmCollectionId"
|
||||||
label="Param"
|
label="Param"
|
||||||
@ -4312,7 +4313,6 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
<input
|
<input
|
||||||
aria-invalid={false}
|
aria-invalid={false}
|
||||||
aria-labelledby="TextFieldLabel7"
|
aria-labelledby="TextFieldLabel7"
|
||||||
autoFocus={true}
|
|
||||||
className="ms-TextField-field field-77"
|
className="ms-TextField-field field-77"
|
||||||
id="confirmCollectionId"
|
id="confirmCollectionId"
|
||||||
onBlur={[Function]}
|
onBlur={[Function]}
|
||||||
@ -4327,12 +4327,16 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</TextFieldBase>
|
</TextFieldBase>
|
||||||
</StyledTextFieldBase>
|
</StyledTextFieldBase>
|
||||||
|
<div
|
||||||
|
tabIndex={0}
|
||||||
|
>
|
||||||
<StyledImageBase
|
<StyledImageBase
|
||||||
alt="Delete param"
|
alt="Delete param"
|
||||||
className="addRemoveIconLabel"
|
className="addRemoveIconLabel"
|
||||||
height={30}
|
height={30}
|
||||||
id="deleteparam"
|
id="deleteparam"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
role="button"
|
||||||
src=""
|
src=""
|
||||||
width={20}
|
width={20}
|
||||||
>
|
>
|
||||||
@ -4342,6 +4346,7 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
height={30}
|
height={30}
|
||||||
id="deleteparam"
|
id="deleteparam"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
role="button"
|
||||||
src=""
|
src=""
|
||||||
styles={[Function]}
|
styles={[Function]}
|
||||||
theme={
|
theme={
|
||||||
@ -4636,17 +4641,23 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
onError={[Function]}
|
onError={[Function]}
|
||||||
onLoad={[Function]}
|
onLoad={[Function]}
|
||||||
|
role="button"
|
||||||
src=""
|
src=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ImageBase>
|
</ImageBase>
|
||||||
</StyledImageBase>
|
</StyledImageBase>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
tabIndex={0}
|
||||||
|
>
|
||||||
<StyledImageBase
|
<StyledImageBase
|
||||||
alt="Add param"
|
alt="Add param"
|
||||||
className="addRemoveIconLabel"
|
className="addRemoveIconLabel"
|
||||||
height={30}
|
height={30}
|
||||||
id="addparam"
|
id="addparam"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
role="button"
|
||||||
src=""
|
src=""
|
||||||
width={20}
|
width={20}
|
||||||
>
|
>
|
||||||
@ -4656,6 +4667,7 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
height={30}
|
height={30}
|
||||||
id="addparam"
|
id="addparam"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
role="button"
|
||||||
src=""
|
src=""
|
||||||
styles={[Function]}
|
styles={[Function]}
|
||||||
theme={
|
theme={
|
||||||
@ -4950,21 +4962,25 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
onError={[Function]}
|
onError={[Function]}
|
||||||
onLoad={[Function]}
|
onLoad={[Function]}
|
||||||
|
role="button"
|
||||||
src=""
|
src=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ImageBase>
|
</ImageBase>
|
||||||
</StyledImageBase>
|
</StyledImageBase>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</Stack>
|
</Stack>
|
||||||
</InputParameter>
|
</InputParameter>
|
||||||
<Stack
|
<Stack
|
||||||
horizontal={true}
|
horizontal={true}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-Stack css-54"
|
className="ms-Stack css-54"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
<StyledImageBase
|
<StyledImageBase
|
||||||
alt="Add param"
|
alt="Add param"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user