mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
fix(a11y): label associations for AdminNewsCreate fields
- htmlFor/id pairs for title, slug, read-time, excerpt and featured-image inputs - add an ariaLabel prop to ColoredItemCombobox (applied to the trigger button) and pass the category/tag labels so the comboboxes have an accessible name (WCAG 1.3.1/4.1.2)
This commit is contained in:
@@ -27,6 +27,7 @@ interface ColoredItemComboboxProps {
|
||||
onCreateNew: (name: string, color: string) => Promise<ColoredItem>;
|
||||
onDelete?: (item: ColoredItem) => Promise<void>;
|
||||
placeholder?: string;
|
||||
ariaLabel?: string;
|
||||
isLoading?: boolean;
|
||||
colors?: string[];
|
||||
className?: string;
|
||||
@@ -39,6 +40,7 @@ export function ColoredItemCombobox({
|
||||
onCreateNew,
|
||||
onDelete,
|
||||
placeholder,
|
||||
ariaLabel,
|
||||
isLoading = false,
|
||||
colors = DEFAULT_COLORS,
|
||||
className,
|
||||
@@ -190,6 +192,7 @@ export function ColoredItemCombobox({
|
||||
isOpen ? 'border-accent-500/50' : 'border-dark-700 hover:border-dark-600',
|
||||
isLoading && 'animate-pulse',
|
||||
)}
|
||||
aria-label={ariaLabel}
|
||||
aria-expanded={isOpen}
|
||||
aria-haspopup="listbox"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user