Skip to content

Commit

Permalink
fix accessbility
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidFyon committed Oct 22, 2024
1 parent a9b795b commit 672922a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/synapse-bridge/src/elements/DialogBox/DialogBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default defineComponent({
closeIcon: mdiClose,
locales,
dialog: this.modelValue,
titleId: `title-${Math.random().toString(36).substring(7)}`
}
},
Expand Down Expand Up @@ -137,11 +138,11 @@ export default defineComponent({
v-bind="options.card"
ref="dialogContent"
id="dialogContent"
:aria-labelledby="title ? title : 'dialogContent'"
:aria-labelledby="titleId ? titleId : 'dialogContent'"
>
<VCardTitle v-bind="options.cardTitle">
<slot name="title">
<h2 v-if="title" class="text-h6 font-weight-bold">
<h2 v-if="title" :id="titleId" class="text-h6 font-weight-bold">
{{ title }}
</h2>
</slot>
Expand Down

0 comments on commit 672922a

Please sign in to comment.