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 {
|
||||
id: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export function Range({ id, label }: RangeProps) {
|
||||
export function Range({ id }: RangeProps) {
|
||||
const setVolume = useSoundStore(state => state.setVolume);
|
||||
const volume = useSoundStore(state => state.sounds[id].volume);
|
||||
const isSelected = useSoundStore(state => state.sounds[id].isSelected);
|
||||
|
||||
return (
|
||||
<input
|
||||
aria-labelledby={label}
|
||||
aria-labelledby={id}
|
||||
autoComplete="off"
|
||||
className={styles.range}
|
||||
disabled={!isSelected}
|
||||
|
@ -79,8 +79,8 @@ export function Sound({
|
||||
>
|
||||
<Like id={id} />
|
||||
<div className={styles.icon}>{icon}</div>
|
||||
<h3 id={label}>{label}</h3>
|
||||
<Range id={id} label={label} />
|
||||
<h3 id={id}>{label}</h3>
|
||||
<Range id={id} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user