Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility Bug Fix: Tab focus doesn't reach Dark mode toggle button #453

Merged
merged 5 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _includes/mode-toggle.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,11 @@

});

$("#mode-toggle-wrapper").keyup(function(e){
if(e.keyCode == 13)
{
bhavykhatri marked this conversation as resolved.
Show resolved Hide resolved
toggle.flipMode();
}
});
bhavykhatri marked this conversation as resolved.
Show resolved Hide resolved

</script>
20 changes: 9 additions & 11 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@
</ul> <!-- ul.nav.flex-column -->

<div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center align-items-center">
{% unless site.theme_mode %}
{% if site.data.contact.size > 0 %}
<span class="icon-border order-2"></span>
{% endif %}

<span id="mode-toggle-wrapper" class="order-1" tabindex="0">
{% include mode-toggle.html %}
</span>
bhavykhatri marked this conversation as resolved.
Show resolved Hide resolved
{% endunless %}

{% for entry in site.data.contact %}
{% capture url %}
Expand All @@ -78,17 +87,6 @@
{% endif %}

{% endfor %}

{% unless site.theme_mode %}
{% if site.data.contact.size > 0 %}
<span class="icon-border order-2"></span>
{% endif %}

<span id="mode-toggle-wrapper" class="order-1">
{% include mode-toggle.html %}
</span>
{% endunless %}

</div> <!-- .sidebar-bottom -->

</div><!-- #sidebar -->