How to fix "The aria-labelledby attribute must point to an element in the same document" error?

13,104

The error message says that you are missing an element with id="myModalLabel".

This element must contain a label for the div element.

If you don’t have the label as visible text, you should use aria-label instead.

Share:
13,104
ThatMan
Author by

ThatMan

Updated on June 07, 2022

Comments

  • ThatMan
    ThatMan almost 2 years

    I am facing this error while validating my web page thru W3C validator and I do not understand how to resolve this error. In my HTML I have used it in multiple s. Below is an example

    <div class="modal fade in" id="undelivered-item-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="display: block;">
    

    Please guide me on how do I fix this issue this as I am new to HTML5.