Skip to content

Commit 3c531d9

Browse files
committed
Theme switcher focus fix
1 parent 6ce338d commit 3c531d9

4 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/_includes/layouts/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% set assetHash = global.random() %}
22

33
<!DOCTYPE html>
4-
<html lang="en" dir="rtl">
4+
<html lang="en">
55
<head>
66
<script src="/js/theme-detection.js?{{ assetHash }}"></script>
77
{% include "partials/preload.html" %}

src/css/main.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,6 +1440,9 @@ samp {
14401440
transform: rotate(45deg);
14411441
}
14421442

1443+
.breadcrumb-list a {
1444+
text-decoration: none;
1445+
}
14431446
.breadcrumb-list [aria-current=page] {
14441447
overflow: hidden;
14451448
text-overflow: ellipsis;

src/js/theme-switcher.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
localStorage.setItem('preferred-theme', theme);
1414
document.documentElement.setAttribute('data-theme-mode', theme === 'system' ? systemMode : theme);
1515
themeSwitcher.setAttribute('data-theme-mode', theme);
16+
themeSwitcher.querySelector(`.theme-switcher__${theme}-mode`).focus();
1617
});
1718

1819
themeSwitcher.setAttribute('data-theme-mode', preferredTheme);

src/scss/component/_breadcrumb-list.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
}
3232
}
3333

34+
a {
35+
text-decoration: none;
36+
}
37+
3438
[aria-current='page'] {
3539
@include text-ellipsis(1);
3640
display: inline-block;

0 commit comments

Comments
 (0)