首页 > 解决方案 > aria-expanded="true" 不适用于移动设备

问题描述

当用户关闭移动设备中的下拉菜单时,aria-expanded="true" 不起作用。它在桌面浏览器页面中运行良好。

桌面

<a class="notifLink" data-toggle="dropdown" aria-haspopup="true" id="notificationDropdown" aria-expanded="false" onclick="{!c.readNotifs}">      
                    <h4 class="linkColor">{!v.notifL}</h4>

                </a>

移动的

<a class="dropdown-toggle notifLink" data-toggle="dropdown" aria-haspopup="true" id="notificationDropdown" aria-expanded="false" onclick="{!c.readNotifs}">
                        <span class="glyphicon glyphicon-bell"></span>
                        <div class="notificationItemsIcon"></div>
                    </a>

我错过了什么?

标签: javascripthtmlwebtwitter-bootstrap-3bootstrap-4

解决方案


嘿,我刚遇到同样的问题。您在使用 Shopify 和 Shogun 吗?对我来说,问题是幕府将军在代码中复制了一些资产,基本上使点击自行取消。我不得不删除页面上的 shogun 部分,之后效果很好。

— 编码经验最少的平面设计师


推荐阅读