update
This commit is contained in:
parent
87833bca2f
commit
fd07b99531
|
|
@ -3494,5 +3494,52 @@ $(function() {
|
|||
|
||||
fixMemberAcademicLinkA11y();
|
||||
});
|
||||
$(function() {
|
||||
function fixSideMenuBtnA11y() {
|
||||
setTimeout(function() {
|
||||
var $btn = $('#side-menu-btn');
|
||||
if ($btn.length === 0) return;
|
||||
|
||||
// ✅ SVG 及其所有子元素設為不可聚焦
|
||||
$btn.find('svg, svg *').each(function() {
|
||||
$(this).attr('focusable', 'false');
|
||||
$(this).attr('tabindex', '-1');
|
||||
$(this).attr('aria-hidden', 'true');
|
||||
});
|
||||
|
||||
// ✅ 確保 button 本身有正確的 aria 屬性
|
||||
$btn.attr({
|
||||
'aria-haspopup': 'true',
|
||||
'aria-expanded': 'false',
|
||||
'aria-controls': 'mySidenav'
|
||||
});
|
||||
|
||||
// ✅ 開啟時同步 aria-expanded
|
||||
$btn.off('click.sideMenuA11y').on('click.sideMenuA11y', function() {
|
||||
var isExpanded = $(this).attr('aria-expanded') === 'true';
|
||||
$(this).attr('aria-expanded', isExpanded ? 'false' : 'true');
|
||||
});
|
||||
|
||||
// ✅ closeNav 關閉時也同步
|
||||
var originalCloseNav = window.closeNav;
|
||||
window.closeNav = function() {
|
||||
if (typeof originalCloseNav === 'function') {
|
||||
originalCloseNav();
|
||||
}
|
||||
$btn.attr('aria-expanded', 'false');
|
||||
};
|
||||
|
||||
// ✅ 新增:關閉按鈕補上 role="button" 和圖片正確 alt
|
||||
var $closeBtn = $('.closebtn');
|
||||
$closeBtn.attr({
|
||||
'role': 'button',
|
||||
'aria-label': '關閉快速連結選單'
|
||||
});
|
||||
$closeBtn.find('img').attr('alt', '關閉');
|
||||
|
||||
}, 500);
|
||||
}
|
||||
|
||||
fixSideMenuBtnA11y();
|
||||
});
|
||||
}(jQuery, window));
|
||||
|
|
|
|||
|
|
@ -79,3 +79,17 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.w-ba-banner .controlplay .resume-slide.active i{
|
||||
color: #32D9C3;
|
||||
}
|
||||
.w-ba-banner .controlplay .pause-slide.active i{
|
||||
color: #ff4500;
|
||||
}
|
||||
.w-ba-banner .controlplay{
|
||||
width: auto;
|
||||
}
|
||||
.next-button,.prev-button{
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -69,3 +69,17 @@
|
|||
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("prev");
|
||||
})
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.w-ba-banner .controlplay .resume-slide.active i{
|
||||
color: #32D9C3;
|
||||
}
|
||||
.w-ba-banner .controlplay .pause-slide.active i{
|
||||
color: #ff4500;
|
||||
}
|
||||
.w-ba-banner .controlplay{
|
||||
width: auto;
|
||||
}
|
||||
.next-button,.prev-button{
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -9,9 +9,7 @@
|
|||
|
||||
<div class="i-member-item-inner clearfix">
|
||||
<div class="i-member-pic-wrap">
|
||||
<a href="{{link_to_show}}" title="{{name}}">
|
||||
<img class="i-member-pic" src="{{image}}" alt="{{name}}">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="i-member-profile-data-wrap">
|
||||
|
|
|
|||
|
|
@ -5,15 +5,16 @@
|
|||
<ul class="list-unstyled" data-level="0" data-list="web_link">
|
||||
<li class="widget-content widget-content-horizontal col-sm-3">
|
||||
<a href="{{link_to_show}}" target="{{target}}" title="{{title_text}}">
|
||||
<div class="link-img-wrap{{display_image}}">
|
||||
<img src="{{img_src}}" alt="{{img_description}}">
|
||||
</div>
|
||||
<div class="widget-content-title">
|
||||
<a class="" href="{{link_to_show}}" target="{{target}}" title="{{title_text}}">{{title}}</a>
|
||||
<span data-list="statuses" data-level="1">
|
||||
<span class="label status {{status-class}}">{{status}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="link-img-wrap{{display_image}}">
|
||||
<img src="{{img_src}}" alt="{{img_description}}">
|
||||
</div>
|
||||
<div class="widget-content-title">
|
||||
<span>{{title}}</span>
|
||||
<span data-list="statuses" data-level="1">
|
||||
<span class="label status {{status-class}}">{{status}}</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue