This commit is contained in:
ken 2026-08-28 15:47:25 +08:00
parent 4db0415613
commit f7dc138bb7
2 changed files with 13 additions and 1 deletions

View File

@ -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: 連結被迴圈跳過)

View File

@ -1,6 +1,9 @@
@charset "utf-8";
@import "../initial";
div#searchOverlay {
display: none;
}
#orbit-bar .orbit-bar-title a {
color: #99163d !important;
}