mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-16 10:11:14 -04:00
accessible ActionSelect
/ ActionInput
(#4132)
* made sure that the ActionSelect'or has correct accessibiltiy tags * fixed linting error * improved the ActionInputs accessibility
This commit is contained in:
parent
9fb95fe95e
commit
9c9a086788
5 changed files with 39 additions and 10 deletions
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<div class="input-group mb-3">
|
||||
<select ref="select" v-model="model" class="form-select" :disabled="disabled" :required="required">
|
||||
<select :id="id" ref="select" v-model="model" class="form-select" :disabled="disabled" :required="required">
|
||||
<option v-for="option in options" :key="option" :value="option.value" :disabled="option.disabled">{{ option.label }}</option>
|
||||
</select>
|
||||
<a class="btn btn-outline-primary" :class="{ disabled: actionDisabled }" @click="action()">
|
||||
<font-awesome-icon :icon="icon" />
|
||||
</a>
|
||||
<button class="btn btn-outline-primary" :class="{ disabled: actionDisabled }" :aria-label="actionAriaLabel" @click="action()">
|
||||
<font-awesome-icon :icon="icon" aria-hidden="true" />
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -20,6 +20,13 @@ export default {
|
|||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
/**
|
||||
* The id of the form which will be targeted by a <label for=..
|
||||
*/
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**
|
||||
* The value of the select field.
|
||||
*/
|
||||
|
@ -51,6 +58,13 @@ export default {
|
|||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
/**
|
||||
* The aria-label of the action button
|
||||
*/
|
||||
actionAriaLabel: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**
|
||||
* Whether the action button is disabled.
|
||||
* @example true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue