Skip to content

Commit e0f6a88

Browse files
committed
feat(footer): add aria-label to icon link
1 parent a8862d9 commit e0f6a88

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/components/common/Footer.astro

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,20 @@ import { Icon } from "astro-icon/components";
3838
<a href="/donation/">ご寄付・ご協賛</a>
3939
<h3 class="footer-title mt-6">ソーシャルリンク</h3>
4040
<div class="grid grid-flow-col gap-4">
41-
<a href="https://github.com/ut-code" target="_blank" data-icon-link>
41+
<a
42+
href="https://github.com/ut-code"
43+
target="_blank"
44+
class="icon-link"
45+
aria-label="github"
46+
>
4247
<Icon name="flowbite:github-solid" class="text-5xl" />
4348
</a>
44-
<a href="https://x.com/utokyo_code" target="_blank" data-icon-link>
49+
<a
50+
href="https://x.com/utokyo_code"
51+
target="_blank"
52+
class="icon-link"
53+
aria-label="X (formerly twitter)"
54+
>
4555
<Icon name="flowbite:x-solid" class="text-5xl" />
4656
</a>
4757
</div>
@@ -55,17 +65,17 @@ import { Icon } from "astro-icon/components";
5565

5666
<style>
5767
@media (prefers-reduced-motion) {
58-
a:not([data-icon-link]):hover {
68+
a:not(.icon-link):hover {
5969
text-decoration: underline;
6070
}
6171
}
6272
@media not (prefers-reduced-motion) {
63-
a:not([data-icon-link]) {
73+
a:not(.icon-link) {
6474
background: linear-gradient(currentColor 0 0) bottom left/
6575
var(--underline-width, 0%) 0.1em no-repeat;
6676
transition: background-size 0.1s linear;
6777
}
68-
a:not([data-icon-link]):hover {
78+
a:not(.icon-link):hover {
6979
--underline-width: 100%;
7080
@starting-style {
7181
--underline-width: 0%;

0 commit comments

Comments
 (0)