mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40: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 (
|
||||
<EuiFormRow
|
||||
isInvalid={Boolean(error)}
|
||||
error={error}
|
||||
aria-label={TESTING_SCRIPT_LABEL}
|
||||
fullWidth
|
||||
>
|
||||
<EuiFormRow isInvalid={Boolean(error)} error={error} aria-label={FORM_ROW_LABEL} fullWidth>
|
||||
<EuiFilePicker
|
||||
id="syntheticsFleetScriptRecorderUploader"
|
||||
aria-label={TESTING_SCRIPT_LABEL}
|
||||
data-test-subj="syntheticsFleetScriptRecorderUploader"
|
||||
ref={filePickerRef as React.Ref<Omit<EuiFilePickerProps, 'stylesMemoizer'>>}
|
||||
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',
|
||||
{
|
||||
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', {
|
||||
defaultMessage: 'Select or drag and drop a .js file',
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue