fix: aria-label warnings for edit profile form
This commit is contained in:
@@ -18,6 +18,7 @@ import styles from "./select.module.css"
|
||||
import type { SelectProps } from "./select"
|
||||
|
||||
export default function Select({
|
||||
"aria-label": ariaLabel,
|
||||
items,
|
||||
label,
|
||||
name,
|
||||
@@ -41,6 +42,7 @@ export default function Select({
|
||||
return (
|
||||
<div className={styles.date} ref={divRef}>
|
||||
<ReactAriaSelect
|
||||
aria-label={ariaLabel}
|
||||
className={styles.select}
|
||||
onSelectionChange={handleOnSelect}
|
||||
placeholder={placeholder}
|
||||
@@ -63,7 +65,7 @@ export default function Select({
|
||||
*/
|
||||
UNSTABLE_portalContainer={divElement ?? undefined}
|
||||
>
|
||||
<ListBox aria-label={name} className={styles.listBox}>
|
||||
<ListBox className={styles.listBox}>
|
||||
{items.map((item) => (
|
||||
<ListBoxItem
|
||||
aria-label={String(item)}
|
||||
|
||||
@@ -51,6 +51,7 @@ export default function DateSelect({
|
||||
|
||||
return (
|
||||
<DatePicker
|
||||
aria-label="Select date of birth"
|
||||
granularity="day"
|
||||
isRequired={!!registerOptions.required}
|
||||
name={name}
|
||||
@@ -73,6 +74,7 @@ export default function DateSelect({
|
||||
return (
|
||||
<DateSegment className={styles.day} segment={segment}>
|
||||
<Select
|
||||
aria-label={_("Day")}
|
||||
items={days}
|
||||
label={_("Day")}
|
||||
name={DateName.date}
|
||||
@@ -86,6 +88,7 @@ export default function DateSelect({
|
||||
return (
|
||||
<DateSegment className={styles.month} segment={segment}>
|
||||
<Select
|
||||
aria-label={_("Month")}
|
||||
items={months}
|
||||
label={_("Month")}
|
||||
name={DateName.month}
|
||||
@@ -99,6 +102,7 @@ export default function DateSelect({
|
||||
return (
|
||||
<DateSegment className={styles.year} segment={segment}>
|
||||
<Select
|
||||
aria-label={_("Year")}
|
||||
items={years}
|
||||
label={_("Year")}
|
||||
name={DateName.year}
|
||||
|
||||
Reference in New Issue
Block a user