Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

fix(webv2): drop aria-multiline from the prompt combobox

joshistoasta8a0096b87f0
diff --git a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/usePromptTriggerAutocomplete.tsx b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/usePromptTriggerAutocomplete.tsx
index 1f1075acd6..3a4b1b719b 100644
--- a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/usePromptTriggerAutocomplete.tsx
+++ b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/usePromptTriggerAutocomplete.tsx
@@ -51,7 +51,6 @@ export interface PromptTriggerAutocompleteApi {
'aria-autocomplete': 'list';
'aria-controls': string | undefined;
'aria-expanded': boolean;
- 'aria-multiline': true;
role: 'combobox';
onCompositionEnd: (event: CompositionEvent<HTMLTextAreaElement>) => void;
onCompositionStart: () => void;
@@ -201,10 +200,10 @@ export const usePromptTriggerAutocomplete = ({
'aria-autocomplete': 'list',
'aria-controls': isOpen ? listboxId : undefined,
'aria-expanded': isOpen,
- // `combobox` overrides the textarea's implicit `textbox` role, which is
- // what carries multiline-ness; without this a tall prompt box announces
- // as a single-line field.
- 'aria-multiline': true,
+ // No `aria-multiline`: `combobox` does override the textarea's implicit
+ // `textbox` role and takes multiline-ness with it, but ARIA does not allow
+ // the attribute on a combobox, and axe rejects it as a critical violation.
+ // The loss is real and there is no way to state it here.
onCompositionEnd: handleCompositionEnd,
onCompositionStart: handleCompositionStart,
role: 'combobox',