Bootstrap ~ "aria-expanded" 元素不接受 <a>

Bootstrap ~ "aria-expanded" not accept by element <a>

我不知道为什么来自 Bootstrap 的示例副本无法锻炼并继续在下面抛出错误消息:

Attribute "aria-expanded" not allowed on element "a" at this point.

<ul class="nav navbar-nav">
                        <li><a href="#">Home </a></li>
                        <li><a href="#">Log-In</a></li>
                        <li class="dropdown">
                            <a href="#" aria-expanded="false" class="dropdown-toggle" data-toggle="dropdown" role="button" >
                                Management <span class="caret"></span>
                            </a>
                            <ul class="dropdown-menu" role="presentation">
                                <li><a href="#">Action</a></li>
                                <li><a href="#">Another action</a></li>
                                <li><a href="#">Something else here</a></li> 
                                <li class="divider"></li>
                                <li><a href="#">Separated link</a></li>
                                <li class="divider"></li>
                                <li><a href="#">One more separated link</a></li>
                            </ul>
                        </li>
</ul>

有人遇到过同样的问题吗?请帮忙!!!

下面使用

<li class="dropdown active">

<li class="dropdown active open">

而不是直接设置

aria-expanded="false"

aria-expanded="true"

分别