Skip to content

Commit 7bc18be

Browse files
TeodorTaushanovilhan007
authored andcommitted
fix(ui5-dialog): Fix aria-labelledby attribute value (#3044)
FIXES: #2946
1 parent 0dac1c5 commit 7bc18be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/main/src/Dialog.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{{#if header.length }}
1010
<slot name="header"></slot>
1111
{{else}}
12-
<h2 class="ui5-popup-header-text">{{headerText}}</h2>
12+
<h2 id="ui5-popup-header-text" class="ui5-popup-header-text">{{headerText}}</h2>
1313
{{/if}}
1414
</header>
1515
{{/if}}

packages/main/src/Dialog.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class Dialog extends Popup {
204204
}
205205

206206
get _ariaLabelledBy() { // Required by Popup.js
207-
return this.ariaLabel ? undefined : "ui5-popup-header";
207+
return (this.ariaLabel || this.header.length) ? undefined : "ui5-popup-header-text";
208208
}
209209

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

0 commit comments

Comments
 (0)