Skip to content

Commit

Permalink
Merge pull request #3510 from OpenLiberty/staging
Browse files Browse the repository at this point in the history
Update prod
  • Loading branch information
natalie-bernhard authored Dec 6, 2023
2 parents 67d3058 + 9a97a7a commit 1ea325c
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion scripts/build/parse_blog_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def addLeadingZero(date,index,addZero):
comma = data.new_tag("span")
comma.string = ","
ft_link["tabindex"] = "0"
ft_link["role"] = "listitem"
ft_link["role"] = "button"
ft_link["class"] = "featured_tag"
ft_link["data-tag-id"] = name
ft_link.string = "{% t blog.tags."+name+" %}"
Expand Down
8 changes: 7 additions & 1 deletion src/main/content/_assets/js/guide-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ var threeColumnBreakpoint = 1440;
var dep = false;
var dep_closed = false;

const preTags = document.querySelectorAll('pre');
preTags.forEach(preTag => {
preTag.setAttribute('tabindex', '0');
preTag.setAttribute('role', 'button');
});

// update twoColumnBreakpoint for the only single pane guide
if (window.location.href.indexOf("cloud-ibm") > -1) {
var twoColumnBreakpoint = 1440;
Expand Down Expand Up @@ -295,7 +301,7 @@ function createEndOfGuideContent() {
.find("p")
.clone();
whatYouLearned.first().prepend("Nice work! "); // Start every what you learned statement with 'Nice work!'
whatYouLearned.attr("tabindex", "0");
whatYouLearned.attr("tabindex", "-1");
leftSide.prepend(whatYouLearned);
$("#great-work-you-re-done, #great-work-youre-done").parent().remove(); // Remove section from the main guide column.
$(
Expand Down
3 changes: 3 additions & 0 deletions src/main/content/_assets/js/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
* IBM Corporation - initial API and implementation
*******************************************************************************/

//set tabindex of pre tags to 0
$('pre').attr('tabindex', '0');

// set up html for copy code block accessibility
var code_blocks_with_copy_to_clipboard = 'pre:not(.no_copy pre)'; // CSS Selector
$(document).ready(function () {
Expand Down
10 changes: 5 additions & 5 deletions src/main/content/_includes/end-of-guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
{% endif %}

<div id="end_of_guide">
<h2 tabindex="0">{% t endofguide.nice_work %} {% t endofguide.where_to_next %}</h2>
<h2 tabindex="-1">{% t endofguide.nice_work %} {% t endofguide.where_to_next %}</h2>
<div id="end_of_guide_left_section">
<p id="guide_attribution"></p>

<h3 id="feedback_rating_question">{% t endofguide.what_do_you_think_of_this_guide %}</h3>
<div id="feedback_ratings">
<img class="guide_rating" id="extreme_dislike" src="/img/1_Extreme_Dislike.png" onclick="$('#dislike_popup').show(); $('.popup_content').focus();" alt="Extreme Dislike" data-guide-rating="1" tabindex="0" aria-label="Rate this guide as extreme dislike">
<img class="guide_rating" id="dislike" src="/img/2_Dislike.png" onclick="$('#dislike_popup').show(); $('.popup_content').focus();" alt="Dislike" data-guide-rating="2" tabindex="0" aria-label="Rate this guide as dislike">
<img class="guide_rating" id="like" src="/img/3_Like.png" onclick="$('#like_popup').show(); $('.popup_content').focus();" alt="Like" data-guide-rating="3" tabindex="0" aria-label="Rate this guide as like">
<img class="guide_rating" id="extreme_like" src="/img/4_Extreme_Like.png" onclick="$('#like_popup').show(); $('.popup_content').focus();" alt="Extreme Like" data-guide-rating="4" tabindex="0" aria-label="Rate this guide as extreme like">
<img class="guide_rating" role="button" id="extreme_dislike" src="/img/1_Extreme_Dislike.png" onclick="$('#dislike_popup').show(); $('.popup_content').focus();" alt="Extreme Dislike" data-guide-rating="1" tabindex="0" aria-label="Rate this guide as extreme dislike">
<img class="guide_rating" role="button" id="dislike" src="/img/2_Dislike.png" onclick="$('#dislike_popup').show(); $('.popup_content').focus();" alt="Dislike" data-guide-rating="2" tabindex="0" aria-label="Rate this guide as dislike">
<img class="guide_rating" role="button" id="like" src="/img/3_Like.png" onclick="$('#like_popup').show(); $('.popup_content').focus();" alt="Like" data-guide-rating="3" tabindex="0" aria-label="Rate this guide as like">
<img class="guide_rating" role="button" id="extreme_like" src="/img/4_Extreme_Like.png" onclick="$('#like_popup').show(); $('.popup_content').focus();" alt="Extreme Like" data-guide-rating="4" tabindex="0" aria-label="Rate this guide as extreme like">
</div>

<div id="like_popup" class="popup">
Expand Down
9 changes: 6 additions & 3 deletions src/main/content/_layouts/guide-multipane.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<img
id="toc_close_white"
src="/img/toc_close_white.svg"
role="button"
alt="Close the table of contents"
tabindex="0"
/>
Expand All @@ -68,6 +69,7 @@ <h3 id="tag_title">{% t guides.tags %}</h3>
<div
id="toc_indicator"
tabindex="0"
role="button"
aria-label="Open the table of contents"
class="hidden"
>
Expand All @@ -78,7 +80,7 @@ <h3 id="tag_title">{% t guides.tags %}</h3>
<div id="guide_column" class="position_relative open">
<div id="guide_content">
<!-- Guide header section -->
<div id="guide_meta" class="sect1" tabindex="0">
<div id="guide_meta" class="sect1" tabindex="-1">
<h1 id="guide_title">{{ page.title }}</h1>
<div id="duration_container">
<img src="/img/guide_duration_clock_icon_large.svg" alt="duration" />
Expand Down Expand Up @@ -161,14 +163,15 @@ <h1 id="guide_title">{{ page.title }}</h1>
</div>

<!-- Code section -->
<div id="code_column" class="position_relative" tabindex="0">
<div id="code_column" class="position_relative" tabindex="-1">
<div id="code_column_title_container">
<div id="code_column_tabs_container" class="dimmed">
<ul id="code_column_tabs" class="nav" role="tablist"></ul>
</div>
<div class="copyFileButton" tabindex="0">
<div class="copyFileButton" tabindex="0" role="button">
<img
src="/img/guides_copy_button.svg"
role="button"
alt="Copy file contents"
title="Copy file contents"
/>
Expand Down
4 changes: 3 additions & 1 deletion src/main/content/_layouts/guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<img
id="toc_close_white"
src="/img/toc_close_white.svg"
role="button"
alt="Close the table of contents"
tabindex="0"
/>
Expand All @@ -66,6 +67,7 @@ <h3 id="tag_title">{% t guides.tags %}</h3>
<div
id="toc_indicator"
tabindex="0"
role="button"
aria-label="Open the table of contents"
class="hidden"
>
Expand All @@ -76,7 +78,7 @@ <h3 id="tag_title">{% t guides.tags %}</h3>
<div id="guide_column" class="position_relative open">
<div id="guide_content">
<!-- Guide header section -->
<div id="guide_meta" class="sect1" tabindex="0">
<div id="guide_meta" class="sect1" tabindex="-1">
<h1 id="guide_title">{{ page.title }}</h1>
<div id="duration_container">
<img
Expand Down
2 changes: 2 additions & 0 deletions src/main/content/_layouts/iguide-multipane.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<img
id="toc_close_white"
src="/img/toc_close_white.svg"
role="button"
alt="Close the table of contents"
tabindex="0"
/>
Expand All @@ -65,6 +66,7 @@ <h3 id="tag_title">{% t guides.tags %}</h3>
<div
id="toc_indicator"
tabindex="0"
role="button"
aria-label="Open the table of contents"
class="hidden"
>
Expand Down

0 comments on commit 1ea325c

Please sign in to comment.