From 47721801aa766ab8487ecd3be588d715b7be726c Mon Sep 17 00:00:00 2001 From: Alex <49969959+alexzhang1030@users.noreply.github.com> Date: Wed, 30 Nov 2022 21:01:03 +0800 Subject: [PATCH] feat(a11y): improve remove attachement accessiblity (#249) --- components/publish/PublishAttachment.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/publish/PublishAttachment.vue b/components/publish/PublishAttachment.vue index edc3a30d..a187f49e 100644 --- a/components/publish/PublishAttachment.vue +++ b/components/publish/PublishAttachment.vue @@ -20,10 +20,13 @@ defineEmits<{ <div absolute right-2 top-2> <div v-if="removable" - hover:bg="gray/40" transition-100 p-1 rounded-5 cursor-pointer op-0 group-hover:op-100 + aria-label="Remove attachment" + hover:bg="gray/40" transition-100 p-1 rounded-5 cursor-pointer + :class="[isSmallScreen ? '' : 'op-0 group-hover:op-100hover:']" + mix-blend-difference @click="$emit('remove')" > - <div i-ri:close-line text-3 /> + <div i-ri:close-line text-3 :class="[isSmallScreen ? 'text-6' : 'text-3']" /> </div> </div> </div>