mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
add a11y label to monitor script uploader (#225518)
## Summary Closes #212467  
This commit is contained in:
parent
e5455131fe
commit
1c76710f67
1 changed files with 7 additions and 7 deletions
|
@ -53,14 +53,10 @@ export function Uploader({ onUpload }: Props) {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiFormRow
|
<EuiFormRow isInvalid={Boolean(error)} error={error} aria-label={FORM_ROW_LABEL} fullWidth>
|
||||||
isInvalid={Boolean(error)}
|
|
||||||
error={error}
|
|
||||||
aria-label={TESTING_SCRIPT_LABEL}
|
|
||||||
fullWidth
|
|
||||||
>
|
|
||||||
<EuiFilePicker
|
<EuiFilePicker
|
||||||
id="syntheticsFleetScriptRecorderUploader"
|
id="syntheticsFleetScriptRecorderUploader"
|
||||||
|
aria-label={TESTING_SCRIPT_LABEL}
|
||||||
data-test-subj="syntheticsFleetScriptRecorderUploader"
|
data-test-subj="syntheticsFleetScriptRecorderUploader"
|
||||||
ref={filePickerRef as React.Ref<Omit<EuiFilePickerProps, 'stylesMemoizer'>>}
|
ref={filePickerRef as React.Ref<Omit<EuiFilePickerProps, 'stylesMemoizer'>>}
|
||||||
initialPromptText={PROMPT_TEXT}
|
initialPromptText={PROMPT_TEXT}
|
||||||
|
@ -72,13 +68,17 @@ export function Uploader({ onUpload }: Props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const TESTING_SCRIPT_LABEL = i18n.translate(
|
const FORM_ROW_LABEL = i18n.translate(
|
||||||
'xpack.synthetics.createPackagePolicy.stepConfigure.monitorIntegrationSettingsSection.browser.uploader.fieldLabel',
|
'xpack.synthetics.createPackagePolicy.stepConfigure.monitorIntegrationSettingsSection.browser.uploader.fieldLabel',
|
||||||
{
|
{
|
||||||
defaultMessage: 'Testing script',
|
defaultMessage: 'Testing script',
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const TESTING_SCRIPT_LABEL = i18n.translate('xpack.synthetics.monitorEdit.uploader.ariaLabel', {
|
||||||
|
defaultMessage: 'Input for uploading a script file for your monitor',
|
||||||
|
});
|
||||||
|
|
||||||
const PROMPT_TEXT = i18n.translate('xpack.synthetics.monitorConfig.uploader.label', {
|
const PROMPT_TEXT = i18n.translate('xpack.synthetics.monitorConfig.uploader.label', {
|
||||||
defaultMessage: 'Select or drag and drop a .js file',
|
defaultMessage: 'Select or drag and drop a .js file',
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue