feat(gallery): enhance close button accessibility

Add .navClose styles for 30% min-width, right alignment, and pointer cursor.
Apply class to close div in mobile gallery nav for consistent keyboard support.

Signed-off-by: Sped0n <hi@sped0n.com>
This commit is contained in:
Sped0n
2025-11-25 20:33:57 +08:00
committed by Ryan
parent 110ff665e7
commit d1a1dba210
2 changed files with 7 additions and 1 deletions

View File

@@ -51,6 +51,12 @@
display: flex;
justify-content: space-between;
align-items: center;
.navClose {
min-width: 30%;
text-align: right;
cursor: pointer;
}
}
}

View File

@@ -37,7 +37,7 @@ export default function GalleryNav(props: {
<span class="num">{indexLength()[2]}</span>
<span class="num">{indexLength()[3]}</span>
</div>
<div onClick={onClick} onKeyDown={onClick}>
<div class="navClose" onClick={onClick} onKeyDown={onClick}>
{capitalizeFirstLetter(props.closeText)}
</div>
</div>