Skip to content

Commit 5d0647e

Browse files
committed
fix(web):solve aria issues
1 parent a751bcb commit 5d0647e

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

web/src/app/SpringEditor.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default function SpringEditor() {
2727
<SelectTrigger
2828
id="spring-bounce-"
2929
className="h-8 w-[7ch] p-0 px-1 text-xl"
30+
aria-label="spring-bounce"
3031
>
3132
<SelectValue />
3233
</SelectTrigger>
@@ -54,6 +55,7 @@ export default function SpringEditor() {
5455
<SelectTrigger
5556
id="spring-duration"
5657
className="h-8 w-[7ch] p-0 px-1 text-xl"
58+
aria-label="spring-duration"
5759
>
5860
<SelectValue />
5961
</SelectTrigger>
@@ -93,7 +95,12 @@ export default function SpringEditor() {
9395
)}
9496
>
9597
Touch me
96-
<input type="checkbox" className="hidden" />
98+
<input
99+
type="checkbox"
100+
className="hidden"
101+
aria-label="Touch me"
102+
id="touch-me"
103+
/>
97104
</label>
98105
</div>
99106
</article>

web/src/app/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ export default function Home() {
99
tailwindcss-spring
1010
</h1>
1111
<div className="rotate-45">
12-
<button className="origin-bottom transition-transform spring-bounce-70 spring-duration-150 hover:scale-y-110 active:scale-y-90">
12+
<button
13+
className="origin-bottom transition-transform spring-bounce-70 spring-duration-150 hover:scale-y-110 active:scale-y-90"
14+
aria-label="Interactive spring"
15+
>
1316
<svg
1417
className="size-8 stroke-red-500"
1518
width="250"

web/src/components/CopyButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default function CopyButton({ text }: { text: string }) {
1010
return (
1111
<Button
1212
className="group mr-2 h-full bg-transparent px-2 text-foreground hover:bg-border/50"
13+
aria-label="Copy to clipboard"
1314
onClick={() => {
1415
if (navigator.clipboard) {
1516
navigator.clipboard.writeText(text);

0 commit comments

Comments
 (0)