Edit for Accessibility.

This commit is contained in:
BoHung Chiu 2021-06-18 10:03:21 +08:00
parent 098c23621f
commit d6d103973d
2 changed files with 6 additions and 2 deletions

View File

@ -29,6 +29,7 @@ class AdBannersController < ApplicationController
image_link += "\" style=\"cursor:pointer;\" onload=\"var el=this;(function(){if(el.parentElement==undefined||el.parentElement.tagName!='A'){el.outerHTML=('<a href=#{b.out_link} target=#{target}>'+el.outerHTML+'</a>');}})()\""
end
images << {
"slide_number" => (i+1),
"image_link" => image_link,
"image_alt" => "ad banner image",
"title" => b.title,
@ -109,6 +110,7 @@ class AdBannersController < ApplicationController
</div>"
end
images << {
"slide_number" => (i+1),
"html" => image_html
}
end

View File

@ -10,7 +10,7 @@
data-cycle-timeout="{{timeout}}"
data-cycle-fx="{{ad_fx}}"
data-cycle-pager=".banner_caption_{{subpart-id}}"
data-pager-template="<li><button></button></li>"
data-pager-template=""
data-pager-active-class="active-slide"
data-cycle-swipe=true
data-cycle-swipe-fx="scrollHorz"
@ -29,7 +29,9 @@
</div>
</div>
<div class="ad-overlay w-ba-banner__caption w-ad-banner__caption w-ad-banner__overlay_{{subpart-id}}"></div>
<div class="w-ba-banner__caption banner-pager banner_caption_{{subpart-id}}"></div>
<div class="w-ba-banner__caption banner-pager banner_caption_{{subpart-id}}" data-list="images" data-level="0">
<li><button title="Slide {{slide_number}}"><span style="display: none;">Slide {{slide_number}}</span></button></li>
</div>
<ul class="controlplay"><a class="resume-slide active" title = "<%= (I18n.locale.to_s =="zh_tw") ? "繼續播放" : "resume" %>"><i></i></a><a class="pause-slide" title = "<%= (I18n.locale.to_s =="zh_tw") ? "暫停播放" : "pause"%>"><i></i></a></ul>
<ul class="button-mid">
<i class="fa fa-angle-left prev-button" aria-hidden="true" title = "<%= (I18n.locale.to_s =="zh_tw") ? "上一張" : "prev" %>"></i>