SSR-532 make label trigger radio button and display pointer on hover.

This commit is contained in:
Bryan Mauger 2023-06-16 14:28:14 -04:00
parent 3b2237ce74
commit 12b8c4a2d4

View file

@ -1,6 +1,7 @@
<template> <template>
<!-- Checkbox groups MUST be wrapped in a <fieldset> and <legend> tag and must contain tabindex --> <!-- Checkbox groups MUST be wrapped in a <fieldset> and <legend> tag and must contain tabindex -->
<div class="ui-radio form-check" :class="[(errors.length > 0 || hasError) ? 'has-error' : '']"> <div class="ui-radio form-check" :class="[(errors.length > 0 || hasError) ? 'has-error' : '']">
<label class="d-flex align-items-start form-check-label" :for="buttonID">
<input <input
type="radio" type="radio"
class="form-check-input" class="form-check-input"
@ -14,7 +15,6 @@
:checked="checkValue" :checked="checkValue"
:validationRules="validationRules" :validationRules="validationRules"
/> />
<label class="d-flex align-items-start form-check-label" :for="buttonID">
<p v-if="buttonLabel" class="m-0">{{ buttonLabel }}</p> <p v-if="buttonLabel" class="m-0">{{ buttonLabel }}</p>
<span v-if="screenReaderOnlyText" class="sr-only">{{ <span v-if="screenReaderOnlyText" class="sr-only">{{
screenReaderOnlyText screenReaderOnlyText
@ -93,6 +93,12 @@
.form-check { .form-check {
position: relative; position: relative;
label {
&:hover {
cursor: pointer;
}
}
.form-check-input { .form-check-input {
border: 1px solid $gray-500; border: 1px solid $gray-500;
border-radius: 50%; border-radius: 50%;
@ -136,4 +142,3 @@
} }
} }
</style> </style>