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";
2222 template : `
2323 <header class="cds--modal-header {{theme}}">
2424 <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>
3337 </header>
3438
3539 `
@@ -55,6 +59,14 @@ export class ModalHeader {
5559 */
5660 @Output ( ) closeSelect = new EventEmitter ( ) ;
5761
62+ buttonNgClass = {
63+ "cds--modal-close" : true
64+ } ;
65+
66+ buttonAttributes = {
67+ "aria-label" : this . i18n . get ( ) . MODAL . CLOSE
68+ } ;
69+
5870 constructor ( protected i18n : I18n ) { }
5971
6072 /**
You can’t perform that action at this time.
0 commit comments