我正在尝试通过键盘可访问性将悬停/焦点下拉列表。当我使用Tab键链接到下拉列表时,它会变得很集中,但是下拉列表不可见。我要去哪里错了? “ @(tabn++)"
仅返回一个整数,并为下一个tabindex增加它
<li class="level-1 departments" tabindex="@(tabn++)">
<a tabindex="@(tabn++)" href="/departments" data-toggle="dropdown" data-trigger="focus hover">Departments</a>
<div class="level1Wrapper">
<ul role="menu" >
@foreach (RossStores.Models.NavItem navItem in Model.NavItems)
{
<li class="level-2">
<a data-trigger="focus" class="disableUrl" tabindex="@(tabn++)">@navItem.Heading</a>
<ul>
@foreach (RossStores.Models.NavItem subNavItem in navItem.NavItems)
{
<li><a tabindex="@(tabn++)" role="menuitem" href="@(subNavItem.Url.TrimEnd("/"))">@Html.Raw(subNavItem.Heading)</a></li>
}
</ul>
</li>
}
</ul>
</div>