Skip to content

'aria-describedby' attribute value references an invalid element id when no caption is configured #6250

@sudo-may

Description

@sudo-may

Describe the bug

aria-describedby attribute value references an invalid element id when no caption is configured; the issue was exposed while running accessibility tests using AXE browser plugin.

Here is a snapshot of AXE plugin when running it against the code found in https://bootstrap-vue.org/docs/components/table#complete-example

image

Perhaps a solution could be to not generate aria-describedby attribute if a caption is not present?

Steps to reproduce the bug

  1. Install AXE Browser plugin; supports FF, Chrome and Edge
  2. Navigate to code CodeSandbox example taken from this Bootstrap-vue example
  3. Click on "Open in a new Window" Icon
    image on top right
  4. Open Dev tools, click on AXE tab and Analyze
  5. Look for ARIA attribute element ID does not exist on the page: aria-describedby="__BVID__20__caption_" accessibility error

Expected behavior

Do not generate aria-describedby attribute if a caption with corresponding id is not present

Versions

Libraries:

  • BootstrapVue: 2.21.1
  • Bootstrap: 4.5.3
  • Vue: 2.6.11

Environment:

  • Browser: Chrome, FF

Demo link

CodeSandbox example.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions