feat(a11y): improve contrast on poll results accessibility (#252)

pull/254/head
Alvaro Saburido 2022-11-30 12:24:20 +01:00 zatwierdzone przez GitHub
rodzic 30b1d6b925
commit e11bf53f86
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 8 usunięć

Wyświetl plik

@ -42,14 +42,11 @@ async function vote(e: Event) {
</form>
<template v-else>
<div v-for="(option, index) of poll.options" :key="index" flex justify-between p-1 relative :style="{ '--bar-width': toPercentage((option.votesCount || 0) / poll.votesCount) }">
<div absolute top-0 left-0 bottom-0 bg-primary-active rounded-lg h-full class="w-[var(--bar-width)]" />
<div z-1 flex items-center gap-1 px-1>
<div>
{{ option.title }}
</div>
<div v-if="poll.voted && poll.ownVotes?.includes(index)">
<div i-ri:checkbox-circle-line />
</div>
<div absolute top-0 left-0 bottom-0 bg-primary-active rounded-l-sm rounded-r-lg h-full class="w-[var(--bar-width)]" />
<div z-1 flex items-center gap-1 px-1 text-inverted>
{{ option.title }}
<div v-if="poll.voted && poll.ownVotes?.includes(index)" i-ri:checkbox-circle-line />
</div>
<div z-1>
{{ poll.votesCount ? toPercentage((option.votesCount || 0) / (poll.votesCount)) : '0%' }}