aboutsummaryrefslogtreecommitdiff
path: root/src/components/checkbox/checkbox.vue
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2023-02-10 09:48:55 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2023-02-10 09:48:55 +0000
commit06551d447c0b702adeb3b16652b90b40fab090f7 (patch)
treeea3cd1fba9a3e9ec7ffc7ea6ba9ed398256f0c78 /src/components/checkbox/checkbox.vue
parent5f8988de929b067d1c0bdba037ddfec0b369d098 (diff)
parent902954b29825647eaf5435c89e379ef4babe7931 (diff)
Merge branch 'tusooa/checkbox-accessibility' into 'develop'
Make checkbox settings accessible See merge request pleroma/pleroma-fe!1778
Diffstat (limited to 'src/components/checkbox/checkbox.vue')
-rw-r--r--src/components/checkbox/checkbox.vue9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/components/checkbox/checkbox.vue b/src/components/checkbox/checkbox.vue
index 7139d4fc..42f89be9 100644
--- a/src/components/checkbox/checkbox.vue
+++ b/src/components/checkbox/checkbox.vue
@@ -5,12 +5,16 @@
>
<input
type="checkbox"
+ class="visible-for-screenreader-only"
:disabled="disabled"
:checked="modelValue"
:indeterminate="indeterminate"
@change="$emit('update:modelValue', $event.target.checked)"
>
- <i class="checkbox-indicator" />
+ <i
+ class="checkbox-indicator"
+ :aria-hidden="true"
+ />
<span
v-if="!!$slots.default"
class="label"
@@ -33,6 +37,7 @@ export default {
<style lang="scss">
@import "../../variables";
+@import "../../mixins";
.checkbox {
position: relative;
@@ -81,8 +86,6 @@ export default {
}
input[type="checkbox"] {
- display: none;
-
&:checked + .checkbox-indicator::before {
color: $fallback--text;
color: var(--inputText, $fallback--text);