vue-multiselect icon indicating copy to clipboard operation
vue-multiselect copied to clipboard

Help Making ADA Compatible

Open ikkysleepy opened this issue 5 months ago • 0 comments

Reproduction Link

Steps to reproduce

<template>

<div class='col-12'>
    <label>Category</label>
   <multiselect
        v-model='form.category_id'
        :options='options'
    >
       <template #singleLabel='props'>
       <div class='mt-1'>
           <font-awesome-icon icon='tag' :color='props.option.color' />
           <span class='mx-2'>
                          <span class='option__title'>{{ props.option.name }}</span>
                        </span>
       </div>
   </template>
       <template #option='props'>
           <div class='mt-1'>
               <font-awesome-icon icon='tag' :color='props.option.color' />
               <span class='mx-2'>
                          <span class='option__title'>{{ props.option.name }}</span>
                        </span>
           </div>
       </template>
       
   </multiselect>
</div>
</template>

<script setup>
    import Multiselect from 'vue-multiselect';
    import { ref } from 'vue';
    import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
    
    const form = ref({
        category_id: {
            'name': 'Restricted',
            'id': 1,
            'value': 1,
            'color': '#FF0000',
            'is_default': false
        }
    });

    const options = [{
        'name': 'Restricted',
        'id': 1,
        'value': 1,
        'color': '#FF0000',
        'is_default': false
    }, { 'name': 'Confidential', 'id': 2, 'value': 2, 'color': '#FFA500', 'is_default': false }, {
        'name': 'Internal',
        'id': 3,
        'value': 3,
        'color': '#FFFF00',
        'is_default': true
    }, { 'name': 'Public', 'id': 4, 'value': 4, 'color': '#00FF00', 'is_default': false }];
</script>

Expected behaviour

Make ADA Compatible.

Actual behaviour

When using the WAVE Evaluation Tool Extension to test ADA compatibility I get this error:

ARIA tabindexARIAMissing form label
<input name="" type="text" autocomplete="off" spellcheck="false" placeholder="Select option" tabindex="0" class="multiselect__input" aria-controls="listbox-null" value="" style="width: 0px; position: absolute; padding: 0px;" aria-activedescendant="null-1">
<span class="multiselect__single"

ikkysleepy avatar Sep 15 '24 02:09 ikkysleepy