Skip to content

BFormGroup doesn't add an id on description/valid-feedback/invalid-feedback slots #5930

Closed
@Axolotle

Description

@Axolotle

Describe the bug

Hi, b-form-group doesn't add ids to its slots except for label. I managed to get one on an slotted invalid-feedback but i can't figure it out how.
Therefore <fieldset>'s aria-describedby isn't updated either and screen readers can't read it.

Steps to reproduce the bug

  1. Go to https://codesandbox.io/s/03tt4
  2. Check ids on the different DOM elements

or just try yourself on Online Playground

<div>
  <b-form-group id="field" :state="false">
    <b-input />

    <template v-slot:label>
      label as slot (with id)
    </template>

    <template v-slot:valid-feedback>
      valid as slot (no id on elem)
    </template>

    <template v-slot:invalid-feedback>
      invalid as slot (no id on elem)
    </template>

    <template v-slot:description>
      description as slot (no id on elem)
    </template>
  </b-form-group>
  
  <b-form-group 
    id="field2" :state="false"
    label="label as prop (with id)"
    valid-feedback="valid as prop (with id)"
    invalid-feedback="invalid as prop (with id)"
    description="description as prop (with id)"
  >
    <b-input />
  </b-form-group>
</div>

Expected behavior

Rendered elems should have field__BV_feedback_invalid_, field__BV_description_, …
Rendered <fieldset> should have aria-describedby="field__BV_description_ field__BV_feedback_invalid_".

Versions

Libraries:

  • BootstrapVue: 2.18.0
  • Bootstrap: 4.5.2
  • Vue: 2.6.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy