mirror of
https://github.com/remvze/moodist.git
synced 2025-09-29 15:30:49 -04:00
fix: set aria label to ID
This commit is contained in:
parent
01f4031812
commit
7e0a9afb17
@ -4,17 +4,16 @@ import styles from './range.module.css';
|
|||||||
|
|
||||||
interface RangeProps {
|
interface RangeProps {
|
||||||
id: string;
|
id: string;
|
||||||
label: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Range({ id, label }: RangeProps) {
|
export function Range({ id }: RangeProps) {
|
||||||
const setVolume = useSoundStore(state => state.setVolume);
|
const setVolume = useSoundStore(state => state.setVolume);
|
||||||
const volume = useSoundStore(state => state.sounds[id].volume);
|
const volume = useSoundStore(state => state.sounds[id].volume);
|
||||||
const isSelected = useSoundStore(state => state.sounds[id].isSelected);
|
const isSelected = useSoundStore(state => state.sounds[id].isSelected);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
aria-labelledby={label}
|
aria-labelledby={id}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
className={styles.range}
|
className={styles.range}
|
||||||
disabled={!isSelected}
|
disabled={!isSelected}
|
||||||
|
@ -79,8 +79,8 @@ export function Sound({
|
|||||||
>
|
>
|
||||||
<Like id={id} />
|
<Like id={id} />
|
||||||
<div className={styles.icon}>{icon}</div>
|
<div className={styles.icon}>{icon}</div>
|
||||||
<h3 id={label}>{label}</h3>
|
<h3 id={id}>{label}</h3>
|
||||||
<Range id={id} label={label} />
|
<Range id={id} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user