Skip to content

Commit 76943bc

Browse files
feat(ui5-fileuploader): Implementing accessiblity specification (#1585)
1 parent 2a426dd commit 76943bc

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

packages/main/src/FileUploader.hbs

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,21 @@
1010
value-state="{{valueState}}"
1111
placeholder="{{placeholder}}"
1212
?disabled="{{disabled}}"
13+
tabindex="-1"
1314
></ui5-input>
1415
{{/unless}}
1516
<slot></slot>
1617
</div>
1718
{{#if _keepInputInShadowDOM}}
1819
<input
1920
type="file"
20-
title="upload file"
21+
title="{{titleText}}"
2122
accept="{{accept}}"
2223
?multiple="{{multiple}}"
2324
?disabled="{{disabled}}"
2425
@change="{{_onChange}}"
26+
aria-hidden="true"
27+
tabindex="-1"
2528
>
2629
{{else}}
2730
<slot name="formSupport">

packages/main/src/FileUploader.js

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
} from "@ui5/webcomponents-base/dist/i18nBundle.js";
99
import {
1010
FILEUPLOAD_BROWSE,
11+
FILEUPLOADER_TITLE,
1112
} from "./generated/i18n/i18n-defaults.js";
1213
import Input from "./Input.js";
1314

@@ -305,6 +306,10 @@ class FileUploader extends UI5Element {
305306
return this.i18nBundle.getText(FILEUPLOAD_BROWSE);
306307
}
307308

309+
get titleText() {
310+
return this.i18nBundle.getText(FILEUPLOADER_TITLE);
311+
}
312+
308313
get _canUseNativeFormSupport() {
309314
return !!this.attachInternals;
310315
}

packages/main/src/i18n/messagebundle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ DELETE=Delete
4747

4848
FILEUPLOAD_BROWSE=Browse...
4949

50+
#XACT: File uploader title
51+
FILEUPLOADER_TITLE=Upload File
52+
5053
GROUP_HEADER_TEXT=Group Header
5154

5255
#XTXT

0 commit comments

Comments
 (0)