Skip to content

Commit 622344d

Browse files
fix(ui5-dialog): Fixed "aria-label" text screen reading (#3936)
Fix #3778
1 parent 5b02831 commit 622344d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/main/src/Dialog.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,13 @@ class Dialog extends Popup {
218218
return ariaLabelledById;
219219
}
220220

221+
/**
222+
* Ensures ariaLabel is never null or empty string
223+
* @returns {String|undefined}
224+
* @protected
225+
*/
221226
get _ariaLabel() {
222-
let ariaLabel;
223-
224-
if (this.header.length > 0 && !!this.accessibleName) {
225-
ariaLabel = this.accessibleName;
226-
}
227-
return this.ariaLabel ? this.ariaLabel : ariaLabel;
227+
return this.accessibleName || undefined;
228228
}
229229

230230
get _ariaModal() { // Required by Popup.js

0 commit comments

Comments
 (0)