Skip to content

Commit

Permalink
fix: added aria attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
kouts committed Apr 18, 2022
1 parent 084ec52 commit 50a52a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,22 @@
role="dialog"
:aria-label="title"
aria-modal="true"
:aria-describedby="`${id}-content`"
:aria-labelledby="`${id}-title`"
@click="clickOutside($event)"
@keydown="keydown($event)"
>
<div ref="vm" class="vm" :data-vm-id="id" :class="modalClass" :style="modalStyle">
<slot name="titlebar">
<div class="vm-titlebar">
<h3 class="vm-title">
<h3 :id="`${id}-title`" class="vm-title">
{{ title }}
</h3>
<button v-if="enableClose" type="button" class="vm-btn-close" aria-label="Close" @click.prevent="close"></button>
</div>
</slot>
<slot name="content">
<div class="vm-content">
<div :id="`${id}-content`" class="vm-content">
<slot></slot>
</div>
</slot>
Expand Down

0 comments on commit 50a52a0

Please sign in to comment.