Skip to content

Commit c536564

Browse files
committed
Blogs_accessibility_fix
1 parent 662614f commit c536564

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/main/content/_assets/css/post.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ body {
161161
}
162162
#article_body a.external {
163163
font-weight: 500;
164-
color: #CC4D19;
164+
color: #BE4513;
165165
transition: color .2s;
166166

167167
&:hover {

src/main/content/_layouts/default.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,20 @@
2323
{% include javascript.html %}
2424

2525
</body>
26+
<script>
27+
document.addEventListener('DOMContentLoaded', () => {
28+
document.querySelectorAll('pre[tabindex="0"]').forEach(el => el.removeAttribute('tabindex'));
29+
});
30+
</script>
31+
<script>
32+
document.addEventListener('DOMContentLoaded', function() {
33+
const tables = document.querySelectorAll('.admonitionblock table, .colist table');
34+
tables.forEach(table => {
35+
if (!table.hasAttribute('role')) {
36+
table.setAttribute('role', 'none');
37+
}
38+
});
39+
});
40+
</script>
2641

2742
</html>

0 commit comments

Comments
 (0)