File tree Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,18 @@ import { I18n } from "carbon-components-angular/i18n";
22
22
template : `
23
23
<header class="cds--modal-header {{theme}}">
24
24
<ng-content></ng-content>
25
- <button
26
- *ngIf="showCloseButton"
27
- type="button"
28
- class="cds--modal-close"
29
- (click)="onClose()">
30
- <span class="cds--assistive-text">{{ closeLabel }}</span>
31
- <svg cdsIcon="close" size="20" class="cds--modal-close__icon"></svg>
32
- </button>
25
+ <div class="cds--modal-close-button">
26
+ <cds-icon-button
27
+ *ngIf="showCloseButton"
28
+ type="button"
29
+ [buttonNgClass]="buttonNgClass"
30
+ [buttonAttributes]="buttonAttributes"
31
+ align="left"
32
+ [description]="closeLabel"
33
+ (click)="onClose()">
34
+ <svg cdsIcon="close" size="20" class="cds--modal-close__icon"></svg>
35
+ </cds-icon-button>
36
+ </div>
33
37
</header>
34
38
35
39
`
@@ -55,6 +59,14 @@ export class ModalHeader {
55
59
*/
56
60
@Output ( ) closeSelect = new EventEmitter ( ) ;
57
61
62
+ buttonNgClass = {
63
+ "cds--modal-close" : true
64
+ } ;
65
+
66
+ buttonAttributes = {
67
+ "aria-label" : this . i18n . get ( ) . MODAL . CLOSE
68
+ } ;
69
+
58
70
constructor ( protected i18n : I18n ) { }
59
71
60
72
/**
You can’t perform that action at this time.
0 commit comments