Skip to content

Commit

Permalink
Accessibility Bug Fix: Tab focus doesn't reach Dark mode toggle button (
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavykhatri authored Nov 30, 2021
1 parent 602e984 commit 707466b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions _includes/mode-toggle.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,10 @@

});

$("#mode-toggle-wrapper").keyup(function(e){
if(e.keyCode == 13) {
toggle.flipMode();
}
});

</script>
4 changes: 2 additions & 2 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</ul> <!-- ul.nav.flex-column -->

<div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center align-items-center">

{% for entry in site.data.contact %}
{% capture url %}
{%- if entry.type == 'github' -%}
Expand Down Expand Up @@ -84,7 +84,7 @@
<span class="icon-border order-2"></span>
{% endif %}

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

0 comments on commit 707466b

Please sign in to comment.