This commit is contained in:
parent
4db0415613
commit
f7dc138bb7
|
|
@ -1248,7 +1248,16 @@ $(function() {
|
|||
}
|
||||
|
||||
// F. 最終清理:移除冗餘 label,避免螢幕閱讀器唸兩次
|
||||
$a.removeAttr('aria-label');
|
||||
// 但若是純圖示連結(沒有文字、沒有可讀 img alt),保留 aria-label
|
||||
var $iconsInA = $a.find('i, svg');
|
||||
var $imgsInA = $a.find('img');
|
||||
var textInA = $a.text().replace(/\u00a0/g, '').trim();
|
||||
var hasReadableImg = $imgsInA.length > 0 && ($imgsInA.attr('alt') || '').trim() !== '';
|
||||
var isIconOnly = ($iconsInA.length > 0 || $imgsInA.length > 0) && textInA === '' && !hasReadableImg;
|
||||
|
||||
if (!isIconOnly) {
|
||||
$a.removeAttr('aria-label');
|
||||
}
|
||||
});
|
||||
|
||||
// ✅ G. 補強特定連結(須在迴圈外,因為 javascript: 連結被迴圈跳過)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
@charset "utf-8";
|
||||
|
||||
@import "../initial";
|
||||
div#searchOverlay {
|
||||
display: none;
|
||||
}
|
||||
#orbit-bar .orbit-bar-title a {
|
||||
color: #99163d !important;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue