fix(front): `aria-pressed` is either true or undefined

environments/review-docs-feat-z0hkbz/deployments/19913
upsiflu 2024-12-22 21:23:45 +01:00
rodzic 137b7c23cf
commit 5f0204cedf
2 zmienionych plików z 9 dodań i 9 usunięć

Wyświetl plik

@ -186,17 +186,17 @@ const focus = () => textarea.value.focus()
@keydown.ctrl.shift.x.exact.prevent="strikethrough" @keydown.ctrl.k.exact.prevent="link" :maxlength="max"
:placeholder="placeholder" v-model="model" id="textarea_id" />
<div class="textarea-buttons">
<Button @click="preview = !preview" icon="bi-eye" color="secondary" :aria-pressed="preview" />
<Button @click="preview = !preview" icon="bi-eye" color="secondary" :aria-pressed="preview || undefined" />
<div class="separator" />
<Button @click="heading1" icon="bi-type-h1" color="secondary" :aria-pressed="isHeading1" :disabled="preview" />
<Button @click="heading2" icon="bi-type-h2" color="secondary" :aria-pressed="isHeading2" :disabled="preview" />
<Button @click="paragraph" icon="bi-paragraph" color="secondary" :aria-pressed="isParagraph" :disabled="preview" />
<Button @click="quote" icon="bi-quote" color="secondary" :aria-pressed="isQuote" :disabled="preview" />
<Button @click="orderedList" icon="bi-list-ol" color="secondary" :aria-pressed="isOrderedList"
<Button @click="heading1" icon="bi-type-h1" color="secondary" :aria-pressed="isHeading1 || undefined" :disabled="preview" />
<Button @click="heading2" icon="bi-type-h2" color="secondary" :aria-pressed="isHeading2 || undefined" :disabled="preview" />
<Button @click="paragraph" icon="bi-paragraph" color="secondary" :aria-pressed="isParagraph || undefined" :disabled="preview" />
<Button @click="quote" icon="bi-quote" color="secondary" :aria-pressed="isQuote || undefined" :disabled="preview" />
<Button @click="orderedList" icon="bi-list-ol" color="secondary" :aria-pressed="isOrderedList || undefined"
:disabled="preview" />
<Button @click="unorderedList" icon="bi-list-ul" color="secondary" :aria-pressed="isUnorderedList"
<Button @click="unorderedList" icon="bi-list-ul" color="secondary" :aria-pressed="isUnorderedList || undefined"
:disabled="preview" />
<div class="separator" />

Wyświetl plik

@ -87,7 +87,7 @@ const labels = computed(() => ({
</PopoverItem>
<hr v-if="store.state.auth.authenticated && store.state.auth.profile?.avatar?.urls.medium_square_crop"/>
<PopoverItem @click="store.commit('ui/toggleModal', 'languages')"
:aria-pressed="store.state.ui.modalsOpen.has('languages')"
:aria-pressed="store.state.ui.modalsOpen.has('languages') || undefined"
>
<i class="bi bi-translate" />
{{ labels.language }}...
@ -128,7 +128,7 @@ const labels = computed(() => ({
{{ labels.docs }}
</PopoverItem>
<PopoverItem @click="store.commit('ui/toggleModal', 'shortcuts')"
:aria-pressed="store.state.ui.modalsOpen.has('shortcuts')"
:aria-pressed="store.state.ui.modalsOpen.has('shortcuts') || undefined"
>
<i class="bi bi-keyboard" />
{{ labels.shortcuts }}