From 6db9f09a02bc4fbbcec9964e42a72c4de705098e Mon Sep 17 00:00:00 2001 From: Georgi Date: Tue, 9 Mar 2021 14:36:01 +0200 Subject: [PATCH] fix(ui5-upload-collection): add region and roledescription to root element (#2915) --- packages/fiori/src/UploadCollection.hbs | 6 +++++- packages/fiori/src/UploadCollection.js | 5 +++++ packages/fiori/src/i18n/messagebundle.properties | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/fiori/src/UploadCollection.hbs b/packages/fiori/src/UploadCollection.hbs index e68d42e3ba33..864193ee7a36 100644 --- a/packages/fiori/src/UploadCollection.hbs +++ b/packages/fiori/src/UploadCollection.hbs @@ -1,4 +1,8 @@ -
+
diff --git a/packages/fiori/src/UploadCollection.js b/packages/fiori/src/UploadCollection.js index 9cc3ae50e079..8fba80773cf9 100644 --- a/packages/fiori/src/UploadCollection.js +++ b/packages/fiori/src/UploadCollection.js @@ -13,6 +13,7 @@ import { UPLOADCOLLECTION_NO_DATA_DESCRIPTION, UPLOADCOLLECTION_DRAG_FILE_INDICATOR, UPLOADCOLLECTION_DROP_FILE_INDICATOR, + UPLOADCOLLECTION_ARIA_ROLE_DESCRIPTION, } from "./generated/i18n/i18n-defaults.js"; import { attachBodyDnDHandler, @@ -331,6 +332,10 @@ class UploadCollection extends UI5Element { return this.noDataDescription || this.i18nBundle.getText(UPLOADCOLLECTION_NO_DATA_DESCRIPTION); } + get _roleDescription() { + return this.i18nBundle.getText(UPLOADCOLLECTION_ARIA_ROLE_DESCRIPTION); + } + get _dndOverlayText() { if (this._dndOverlayMode === UploadCollectionDnDOverlayMode.Drag) { return this.i18nBundle.getText(UPLOADCOLLECTION_DRAG_FILE_INDICATOR); diff --git a/packages/fiori/src/i18n/messagebundle.properties b/packages/fiori/src/i18n/messagebundle.properties index ce88669c7c25..25239b36f068 100644 --- a/packages/fiori/src/i18n/messagebundle.properties +++ b/packages/fiori/src/i18n/messagebundle.properties @@ -96,6 +96,9 @@ UPLOADCOLLECTION_NO_DATA_TEXT=No files found. #XMSG: Message text for no data description in the UploadCollection UPLOADCOLLECTION_NO_DATA_DESCRIPTION=Drop files to upload, or use the Upload button. +#XACT: ARIA announcement for the ettribute 'aria-roledescription' of the UploadCollection component +UPLOADCOLLECTION_ARIA_ROLE_DESCRIPTION=Upload collection + #XMSG: Message text indicating where to drag UPLOADCOLLECTION_DRAG_FILE_INDICATOR=Drag files here