update
This commit is contained in:
parent
db1d6ddf3f
commit
d672ae584a
|
|
@ -65,7 +65,22 @@
|
||||||
})
|
})
|
||||||
$('[data-subpart-id="{{subpart-id}}"] .prev-button').click(function(){
|
$('[data-subpart-id="{{subpart-id}}"] .prev-button').click(function(){
|
||||||
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("prev");
|
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("prev");
|
||||||
})
|
});
|
||||||
|
/* 修正點:處理 Pager 無障礙朗讀文字 */
|
||||||
|
$('.cycle-slideshow').on('cycle-post-initialize', function(event, optionHash) {
|
||||||
|
var $container = $(this).closest('.w-ba-banner');
|
||||||
|
var $slides = $(this).find('.w-ba-banner__slide');
|
||||||
|
var $pagerButtons = $container.find(".banner-pager button");
|
||||||
|
|
||||||
|
$pagerButtons.each(function(index) {
|
||||||
|
var slideTitle = $slides.eq(index).data('cycle-title') || "";
|
||||||
|
var ariaLabel = "第 " + (index + 1) + " 張投影片 " + slideTitle;
|
||||||
|
$(this).attr({
|
||||||
|
"aria-label": ariaLabel,
|
||||||
|
"title": ariaLabel
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.w-ba-banner .controlplay .resume-slide.active i{
|
.w-ba-banner .controlplay .resume-slide.active i{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue