[8.18] add a11y label to monitor script uploader (#225518) (#225552)

# Backport

This will backport the following commits from `main` to `8.18`:
- [add a11y label to monitor script uploader
(#225518)](https://github.com/elastic/kibana/pull/225518)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Bailey
Cash","email":"bailey.cash@elastic.co"},"sourceCommit":{"committedDate":"2025-06-26T20:19:41Z","message":"add
a11y label to monitor script uploader (#225518)\n\n## Summary\n\nCloses
#212467\n\n![Screenshot 2025-06-26 at 12
38\n17 PM](https://github.com/user-attachments/assets/60b3805b-ce58-48d9-97fe-b946c3a14684)\n\n![Screenshot
2025-06-26 at 12
37\n53 PM](https://github.com/user-attachments/assets/cad36c1f-6a77-41eb-a5bd-52c74181c246)","sha":"1c76710f67334c3f76414062fcfe12a2b5f66ec9","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0","author:obs-ux-management","v9.2.0","v8.18.4","v9.0.4","v8.17.9"],"title":"add
a11y label to monitor script
uploader","number":225518,"url":"https://github.com/elastic/kibana/pull/225518","mergeCommit":{"message":"add
a11y label to monitor script uploader (#225518)\n\n## Summary\n\nCloses
#212467\n\n![Screenshot 2025-06-26 at 12
38\n17 PM](https://github.com/user-attachments/assets/60b3805b-ce58-48d9-97fe-b946c3a14684)\n\n![Screenshot
2025-06-26 at 12
37\n53 PM](https://github.com/user-attachments/assets/cad36c1f-6a77-41eb-a5bd-52c74181c246)","sha":"1c76710f67334c3f76414062fcfe12a2b5f66ec9"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.2","8.18","9.0","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225518","number":225518,"mergeCommit":{"message":"add
a11y label to monitor script uploader (#225518)\n\n## Summary\n\nCloses
#212467\n\n![Screenshot 2025-06-26 at 12
38\n17 PM](https://github.com/user-attachments/assets/60b3805b-ce58-48d9-97fe-b946c3a14684)\n\n![Screenshot
2025-06-26 at 12
37\n53 PM](https://github.com/user-attachments/assets/cad36c1f-6a77-41eb-a5bd-52c74181c246)","sha":"1c76710f67334c3f76414062fcfe12a2b5f66ec9"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Bailey Cash <bailey.cash@elastic.co>
This commit is contained in:
Kibana Machine 2025-06-26 16:14:37 -06:00 committed by GitHub
parent 1dd50a8812
commit af7c0da3c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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',
});