change div to aside tag and add aria-label to contain campaign banner html variant element (#15034)

This commit is contained in:
Cristien Natal 2021-10-13 16:59:58 +01:00 committed by GitHub
parent 2b3190c8b5
commit 82a0035e8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,7 @@
<div id="page-content-inner">
<div id="page-route-change" class="screen-reader-only" aria-live="polite" aria-atomic="true"></div>
<% if @hero_html %>
<div id="hero-html-wrapper" class="overflow-x-hidden" data-name="<%= @hero_area.name %>">
<aside id="hero-html-wrapper" aria-label="Campaign banner" class="overflow-x-hidden" data-name="<%= @hero_area.name %>">
<script>
// Make sure html variant element has id hero-html-wrapper and data-name as its name
if (localStorage.getItem('exited_hero') === '<%= @hero_area.name.html_safe %>') {
@ -99,7 +99,7 @@
}
</script>
<%= @hero_html.html_safe %>
</div>
</aside>
<% end %>
<%= yield %>
<div id="runtime-banner-container"></div>