Fix more unfocusable elements

This commit is contained in:
Freeplay 2023-05-10 17:44:08 -04:00
parent 5e23d960ab
commit f5867f2541
5 changed files with 25 additions and 12 deletions

View file

@ -1,5 +1,5 @@
<template> <template>
<div v-if="hide" class="qjewsnkg" @click="hide = false"> <button v-if="hide" class="qjewsnkg" @click="hide = false">
<ImgWithBlurhash <ImgWithBlurhash
class="bg" class="bg"
:hash="image.blurhash" :hash="image.blurhash"
@ -15,7 +15,7 @@
<span style="display: block">{{ i18n.ts.clickToShow }}</span> <span style="display: block">{{ i18n.ts.clickToShow }}</span>
</div> </div>
</div> </div>
</div> </button>
<div v-else class="gqnyydlz"> <div v-else class="gqnyydlz">
<a :href="image.url" :title="image.name"> <a :href="image.url" :title="image.name">
<ImgWithBlurhash <ImgWithBlurhash
@ -79,6 +79,7 @@ watch(
<style lang="scss" scoped> <style lang="scss" scoped>
.qjewsnkg { .qjewsnkg {
all: unset;
position: relative; position: relative;
> .bg { > .bg {
@ -103,6 +104,10 @@ watch(
color: #fff; color: #fff;
} }
} }
&:focus-visible {
border: 2px solid var(--accent);
}
} }
.gqnyydlz { .gqnyydlz {

View file

@ -197,7 +197,7 @@
</div> </div>
</article> </article>
</div> </div>
<div v-else class="muted" @click="muted.muted = false"> <button v-else class="muted _button" @click="muted.muted = false">
<I18n :src="softMuteReasonI18nSrc(muted.what)" tag="small"> <I18n :src="softMuteReasonI18nSrc(muted.what)" tag="small">
<template #name> <template #name>
<MkA <MkA
@ -212,7 +212,7 @@
<b class="_blur_text">{{ muted.matched.join(", ") }}</b> <b class="_blur_text">{{ muted.matched.join(", ") }}</b>
</template> </template>
</I18n> </I18n>
</div> </button>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -747,5 +747,6 @@ function readPromo() {
padding: 8px; padding: 8px;
text-align: center; text-align: center;
opacity: 0.7; opacity: 0.7;
width: 100%;
} }
</style> </style>

View file

@ -3,7 +3,7 @@
v-size="{ max: [310, 500] }" v-size="{ max: [310, 500] }"
class="gafaadew" class="gafaadew"
:class="{ modal, _popup: modal }" :class="{ modal, _popup: modal }"
:aria-label="i18n.ts.blocks.post" :aria-label="i18n.ts._pages.blocks.post"
@dragover.stop="onDragover" @dragover.stop="onDragover"
@dragenter="onDragenter" @dragenter="onDragenter"
@dragleave="onDragleave" @dragleave="onDragleave"

View file

@ -7,12 +7,17 @@
:style="{ background: bg }" :style="{ background: bg }"
@click="onClick" @click="onClick"
> >
<i <button
@click="goBack()"
v-if="props.displayBackButton" v-if="props.displayBackButton"
class="_button button icon backButton"
@click.stop="goBack()"
@touchstart="preventDrag"
v-tooltip.noDelay="i18n.ts.goBack" v-tooltip.noDelay="i18n.ts.goBack"
class="icon backButton ph-caret-left ph-bold ph-lg" >
<i
class="ph-caret-left ph-bold ph-lg"
></i> ></i>
</button>
<div v-if="narrow" class="buttons left" @click="openAccountMenu"> <div v-if="narrow" class="buttons left" @click="openAccountMenu">
<MkAvatar <MkAvatar
v-if="props.displayMyAvatar && $i" v-if="props.displayMyAvatar && $i"
@ -377,7 +382,7 @@ onUnmounted(() => {
display: none; display: none;
} }
> .button { > .button/*, @at-root .backButton*/ { /* I don't know how to get this to work */
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

View file

@ -296,7 +296,6 @@ definePageMetadata({
> .toggleWrapper { > .toggleWrapper {
display: inline-block; display: inline-block;
text-align: left; text-align: left;
overflow: clip;
padding: 0 100px; padding: 0 100px;
vertical-align: bottom; vertical-align: bottom;
@ -304,6 +303,10 @@ definePageMetadata({
position: absolute; position: absolute;
left: -99em; left: -99em;
} }
&:focus-within > .toggle {
outline: auto;
}
} }
.toggle { .toggle {
@ -506,7 +509,6 @@ definePageMetadata({
} }
} }
} }
> .sync { > .sync {
padding: 14px 16px; padding: 14px 16px;
border-top: solid 0.5px var(--divider); border-top: solid 0.5px var(--divider);