Skip to content

Commit 40e5148

Browse files
authored
Merge pull request #161 from aradhikaIbm/modal-dap-fixes
Fix DAP issues for Modal
2 parents 3b75920 + 593099f commit 40e5148

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

src/modal/alert-modal.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import Modal from "./modal.decorator";
5858
@Component({
5959
selector: "ibm-alert-modal",
6060
template: `
61-
<ibm-modal [modalType]="modalType">
61+
<ibm-modal [modalType]="modalType" [modalLabel]="modalTitle">
6262
<ibm-modal-header (closeSelect)="closeModal()">
6363
<p class="bx--modal-header__label bx--type-delta">{{modalLabel}}</p>
6464
<p class="bx--modal-header__heading bx--type-beta">{{modalTitle}}</p>

src/modal/modal-footer.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Component } from "@angular/core";
88
@Component({
99
selector: "ibm-modal-footer",
1010
template: `
11-
<footer role="contentinfo" class="bx--modal-footer">
11+
<footer class="bx--modal-footer">
1212
<ng-content></ng-content>
1313
</footer>
1414
`

src/modal/modal-header.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Component, Output, EventEmitter, Input } from "@angular/core";
1818
@Component({
1919
selector: "ibm-modal-header",
2020
template: `
21-
<header class="{{modalType}} bx--modal-header" role="banner">
21+
<header class="{{modalType}} bx--modal-header">
2222
<div class="bx--modal-header">
2323
<ng-content></ng-content>
2424
</div>

src/modal/modal.component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ import { cycleTabs } from "./../common/tab.service";
9090
<div
9191
class="bx--modal-container"
9292
[@modalState]="modalState"
93-
role="main"
93+
role="dialog"
9494
aria-modal="true"
9595
tabindex="0"
9696
style="z-index:1;"
97+
[attr.aria-label]="modalLabel"
9798
#modal>
9899
<ng-content></ng-content>
99100
</div>
@@ -125,6 +126,13 @@ export class ModalComponent implements AfterViewInit, OnInit, OnDestroy {
125126
* @memberof ModalComponent
126127
*/
127128
@Input() modalType = "default";
129+
130+
/**
131+
* Label for the modal.
132+
* @memberof ModalComponent
133+
*/
134+
@Input() modalLabel = "default";
135+
128136
/**
129137
* Emits event when click occurs within `n-overlay` element. This is to track click events occuring outside bounds of the `Modal` object.
130138
* @memberof ModalComponent

0 commit comments

Comments
 (0)