Skip to content

Commit 0d4194a

Browse files
authored
fix(modal): add close modal aria-label to modal close button (#259)
1 parent dfd4326 commit 0d4194a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/modal/modal--nofooter.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
<div class="bx--modal-header">
66
<h4 class="bx--modal-header__label">Label (Optional)</h4>
77
<h2 class="bx--modal-header__heading">Modal Title</h2>
8-
<button class="bx--modal-close" type="button" data-modal-close data-modal-primary-focus>
8+
<button class="bx--modal-close" type="button" data-modal-close data-modal-primary-focus aria-label="close modal">
99
<svg class="bx--modal-close__icon" width="10" height="10" viewBox="0 0 10 10" fill-rule="evenodd">
10+
<title>Close Modal</title>
1011
<path d="M9.8 8.6L8.4 10 5 6.4 1.4 10 0 8.6 3.6 5 .1 1.4 1.5 0 5 3.6 8.6 0 10 1.4 6.4 5z"></path>
1112
</svg>
1213
</button>

src/components/modal/modal.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
<div class="bx--modal-header">
66
<h4 class="bx--modal-header__label">Label (Optional)</h4>
77
<h2 class="bx--modal-header__heading">Modal Title</h2>
8-
<button class="bx--modal-close" type="button" data-modal-close>
8+
<button class="bx--modal-close" type="button" data-modal-close aria-label="close modal">
99
<svg class="bx--modal-close__icon" width="10" height="10" viewBox="0 0 10 10" fill-rule="evenodd">
10+
<title>Close Modal</title>
1011
<path d="M9.8 8.6L8.4 10 5 6.4 1.4 10 0 8.6 3.6 5 .1 1.4 1.5 0 5 3.6 8.6 0 10 1.4 6.4 5z"></path>
1112
</svg>
1213
</button>

0 commit comments

Comments
 (0)