Home > Back-end >  Bootstrap 5 - "Attribute href not allowed on element input at this point."
Bootstrap 5 - "Attribute href not allowed on element input at this point."

Time:11-08

I have a tab navigation and inside the second tab I have a checkbox switch that collapses and expands a div.

It all works but on W3 validator I get this:

enter image description here

<div >
    <input  
            type="checkbox" id="check-send-password"
           data-bs-toggle="collapse"
           href="#resetpassword" role="button"
           aria-expanded="false" 
           aria-controls="resetpassword" 
           aria-pressed="true">
</div>

How can I make W3 validate this document while keeping its functionality? I suspect it's something to do with it not being visible as page loads.

CodePudding user response:

I changed:

href="#resetpassword"

To:

data-bs-target="#resetpassword"
  • Related