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.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
fix(a11y): include each control's visible text in its accessible name
Josh Corbett09f9f70008b3
diff --git a/invokeai/frontend/webv2/public/locales/en.json b/invokeai/frontend/webv2/public/locales/en.jsonindex 6b51cf19e5..005dc8ca88 100644--- a/invokeai/frontend/webv2/public/locales/en.json+++ b/invokeai/frontend/webv2/public/locales/en.json@@ -187,7 +187,7 @@"searchOptions": "Search…","close": "Close","colorPicker": {- "format": "Color format",+ "format": "Color format: {{format}}","sampleFromCanvas": "Pick a color from the canvas","sampleFromScreen": "Pick a color from the screen","opacity": "Opacity (%)",@@ -196,7 +196,7 @@"saturationValueText": "Saturation {{saturation}}%, value {{value}}%"},"scrubber": {- "editValue": "Edit {{label}}"+ "editValue": "Edit {{label}}: {{value}}"},"list": {"selectItem": "Select {{name}}"@@ -3361,7 +3361,7 @@"fitToView": "Fit to view","moreSaveOptions": "More save options","newCanvasConfirm": "Clear all layers and start a fresh canvas? This cannot be undone.",- "zoomLevel": "Zoom level"+ "zoomLevel": "Zoom level: {{zoom}}"},"hideStagedResultPreview": "Hide staged result preview","hideStagingThumbnails": "Hide staging thumbnails",@@ -4333,7 +4333,7 @@"collapse": "Collapse color pane","expand": "Expand color pane","foreground": "Foreground color",- "format": "Color value format",+ "format": "Color value format: {{format}}","palette": "Project palette","pickerModeBox": "Switch to box picker","pickerModeWheel": "Switch to wheel picker",@@ -4486,7 +4486,6 @@"clearSemanticSearch": "Clear semantic search","exitSemanticSearch": "Exit semantic search","createBoard": "Create board",- "collapseStarredItems": "Collapse starred items","dateBoards": "Date boards","dateFilterDay": "{{date}}","dateFilterFrom": "From {{date}}",@@ -4538,7 +4537,6 @@"dropMediaToUploadToBoard": "Drop images, videos, or audio to upload to {{name}}","emptyBoardUploadHint": "Drop media here or click to upload","exportProjectFromBoard": "Export project (.invk)",- "expandStarredItems": "Expand starred items","filterAndSortBoards": "Filter & sort boards","findInGallery": "Find in Gallery","findNamedInGallery": "Find {{name}} in Gallery",@@ -4548,6 +4546,7 @@"imageCount_other": "{{count}} images","imageSize": "Image size","imageSort": "Image Sort",+ "imageSortValue": "Image sort: {{order}}","infinite": "Infinite","middleClickOpensInNewTab": "Middle-click opens media in a new tab","itemActions": {diff --git a/invokeai/frontend/webv2/scripts/run-accessibility-journeys.mjs b/invokeai/frontend/webv2/scripts/run-accessibility-journeys.mjsindex f7deb627f0..9e3a31fc9d 100644--- a/invokeai/frontend/webv2/scripts/run-accessibility-journeys.mjs+++ b/invokeai/frontend/webv2/scripts/run-accessibility-journeys.mjs@@ -370,6 +370,84 @@ const runShortcutGuideJourney = async (browser) => {return { id: 'workbench-shortcuts', status: 'passed' };};+/**+ * A status-bar chip is named by its compact content, so every built-in chip must say which widget it is first. Enable+ * every bottom widget the menu offers, then match each chip's name to one enabled label.+ */+const runStatusBarNamesJourney = async (browser) => {+ const { context, page, pageErrors } = await openRepresentativePage(browser, representativeProjectPath);+ const id = 'workbench-status-bar-names';++ try {+ await waitForWorkbench(page);+ const footer = page.locator('footer');+ await footer.getByRole('button', { exact: true, name: 'Bottom widget visibility' }).click();+ const menu = page.getByRole('menu');+ await menu.waitFor();+ const items = menu.getByRole('menuitemcheckbox');++ for (let index = 0; index < (await items.count()); index++) {+ const item = items.nth(index);++ if (+ (await item.getAttribute('aria-checked')) === 'false' &&+ (await item.getAttribute('aria-disabled')) !== 'true'+ ) {+ await item.click();+ await page.waitForFunction(+ (element) => element.getAttribute('aria-checked') === 'true',+ await item.elementHandle()+ );+ }+ }++ const labels = [];++ for (let index = 0; index < (await items.count()); index++) {+ if ((await items.nth(index).getAttribute('aria-checked')) === 'true') {+ // Item text only: a failed widget's row also carries a "Failed" note.+ labels.push(((await items.nth(index).locator('[data-part="item-text"]').textContent()) ?? '').trim());+ }+ }++ await page.keyboard.press('Escape');+ await menu.waitFor({ state: 'hidden' });+ // A chip still loading its view is named "Loading <label>" by its busy status fallback.+ await page.waitForFunction(() => document.querySelector('footer [aria-busy="true"]') === null);+ await waitForSettledDocument(page);+ const chips = footer.locator('[data-status-bar-widget] > [role="button"]');+ const escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');++ assert.ok(labels.length >= 8, `Every built-in bottom widget must be enabled; got ${JSON.stringify(labels)}.`);+ assert.equal(await chips.count(), labels.length, 'Each enabled bottom widget must render one status-bar chip.');++ for (const label of labels) {+ // Chromium's computed name; the label must lead as whole words ("Gallery: 102 items", "Queue status Queue idle").+ const named = footer.getByRole('button', { name: new RegExp(`^${escapeRegExp(label)}(?:$|[\\s:])`) });+ assert.equal(+ await chips.and(named).count(),+ 1,+ `Exactly one status-bar chip's name must start with "${label}"; chips: ${(await chips.allInnerTexts()).join(' | ')}.`+ );+ }++ await assertNoAxeViolations(page, id, { include: ['footer'] });++ if (pageErrors.length > 0) {+ throw new AggregateError(pageErrors, `${id} raised uncaught browser errors.`);+ }+ } catch (error) {+ const directory = resolve(root, 'artifacts/accessibility');+ await mkdir(directory, { recursive: true });+ await page.screenshot({ path: resolve(directory, `${id}.png`) }).catch(() => undefined);+ throw error;+ } finally {+ await context.close();+ }++ return { id: 'workbench-status-bar-names', status: 'passed' };+};+const runKeyboardJourney = async (browser) => {const { context, page, pageErrors } = await openRepresentativePage(browser, '/#/');@@ -910,7 +988,7 @@ const runKeepAliveStateJourney = async (browser) => {await selectLayoutPreset(page, 'Edit', 'Canvas');- const zoomTrigger = page.getByRole('button', { exact: true, name: 'Zoom level' });+ const zoomTrigger = page.getByRole('button', { name: /^Zoom level\b/ });await zoomTrigger.click();await page.getByRole('menuitem', { exact: true, name: '200%' }).click();await waitForSettledDocument(page);@@ -1305,6 +1383,9 @@ try {if (!requestedJourney || requestedJourney === 'workbench-shortcuts') {reports.push(await runShortcutGuideJourney(browser));}+ if (!requestedJourney || requestedJourney === 'workbench-status-bar-names') {+ reports.push(await runStatusBarNamesJourney(browser));+ }if (!requestedJourney || requestedJourney === 'workbench-topbar-responsive') {reports.push(await runResponsiveTopbarJourney(browser));}diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryGridFocus.browser.test.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryGridFocus.browser.test.tsxindex 0e56e6331c..c7537a8798 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryGridFocus.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryGridFocus.browser.test.tsx@@ -94,7 +94,6 @@ void i18n.use(initReactI18next).init({translation: {widgets: {gallery: {- collapseStarredItems: 'Collapse starred items',deleteConfirmLabel: 'Delete',deleteImagesConfirmTitle: 'Delete image?',inProgress: 'In progress',@@ -903,7 +902,8 @@ describe('Gallery grid keyboard focus', () => {});// The strip's disclosure comes first, then the one thumbnail Tab stop.await tabIntoGallery();- expect(document.activeElement?.getAttribute('aria-label')).toBe('Collapse starred items');+ expect(document.activeElement?.getAttribute('aria-expanded')).toBe('true');+ expect(document.activeElement?.textContent).toMatch(/^Starred/);await act(() => userEvent.tab());expect(focusedThumbnail()).toBe('starred-0.png');diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsxindex 797235515b..2c9f97a8eb 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsx@@ -219,10 +219,8 @@ void i18n.use(initReactI18next).init({noStarredItemsMatch: 'No starred items',showAllStarred: 'Show all',showAllStarredItems: 'Show all starred items',- collapseStarredItems: 'Collapse starred items',dropMediaToUploadToBoard: 'Drop media to {{name}}',emptyBoardUploadHint: 'Drop media here or click to upload',- expandStarredItems: 'Expand starred items',selectImageForPreview: 'Select {{name}} for preview',selectVideoForPreview: 'Select video {{name}}, duration {{duration}}, for preview',selectedBoardFallback: 'selected board',@@ -722,6 +720,22 @@ const getButton = (label: string): HTMLButtonElement => {return button;};+/** The starred disclosure is named by its visible heading and count; `aria-expanded` carries its state. */+const findStarredToggle = (expanded: boolean): HTMLButtonElement | null =>+ [...(host?.querySelectorAll<HTMLButtonElement>(`button[aria-expanded="${String(expanded)}"]`) ?? [])].find((button) =>+ button.textContent?.startsWith('Starred')+ ) ?? null;++const getStarredToggle = (expanded: boolean): HTMLButtonElement => {+ const button = findStarredToggle(expanded);++ if (!button) {+ throw new Error(`Expected the ${expanded ? 'expanded' : 'collapsed'} starred disclosure`);+ }++ return button;+};+const click = (button: HTMLButtonElement, init: MouseEventInit = {}): Promise<void> =>interact(() => button.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, ...init })));@@ -815,12 +829,13 @@ describe('GalleryImageGrid mixed item cells', () => {setStrip([starred]);await renderGallery(createGallery({ items: [createItem('image', 'regular.png')], settings: DENSE_SETTINGS }));- const trigger = getButton('Collapse starred items');+ const trigger = getStarredToggle(true);const starredSection = host?.querySelector('[data-gallery-section="starred"]');const regularSection = host?.querySelector('[data-gallery-section="regular"]');expect(trigger.getAttribute('aria-expanded')).toBe('true');- expect(trigger.textContent).toContain('Starred');+ // The visible heading and count are the whole name (WCAG 2.5.3).+ await expect.element(trigger).toHaveAccessibleName(/^Starred\s+1$/);expect(trigger.closest('[role="list"]')).toBeNull();expect(starredSection?.querySelector('button[aria-label="Select starred.png for preview"]')).not.toBeNull();expect(regularSection?.querySelector('button[aria-label="Select regular.png for preview"]')).not.toBeNull();@@ -834,7 +849,7 @@ describe('GalleryImageGrid mixed item cells', () => {setStrip([starred], 7);await renderGallery(createGallery({ items: [createItem('image', 'regular.png')], settings: DENSE_SETTINGS }));- const trigger = getButton('Collapse starred items');+ const trigger = getStarredToggle(true);expect([...trigger.querySelectorAll<HTMLElement>('span')].some((span) => span.textContent === '7')).toBe(true);await click(getButton('Show all starred items'));@@ -850,7 +865,7 @@ describe('GalleryImageGrid mixed item cells', () => {background);- const trigger = getButton('Collapse starred items');+ const trigger = getStarredToggle(true);const count = [...trigger.querySelectorAll<HTMLElement>('span')].find((span) => span.textContent === '1');const surface = host?.querySelector<HTMLElement>('[data-testid="gallery-surface"]');@@ -872,7 +887,7 @@ describe('GalleryImageGrid mixed item cells', () => {setStrip([starred], 3);await renderGallery(createGallery({ items: [createItem('image', 'regular.png')], settings: DENSE_SETTINGS }));- const trigger = getButton('Collapse starred items');+ const trigger = getStarredToggle(true);const header = trigger.parentElement;expect(header?.getBoundingClientRect().height).toBe(24);@@ -888,10 +903,10 @@ describe('GalleryImageGrid mixed item cells', () => {const pinned = host!.querySelector<HTMLElement>('[data-gallery-pinned]')!;const listingTop = () => host!.querySelector('[data-gallery-section="regular"]')!.getBoundingClientRect().top;- const headerRect = getButton('Collapse starred items').parentElement?.getBoundingClientRect();+ const headerRect = getStarredToggle(true).parentElement?.getBoundingClientRect();const starredRect = getButton('Select starred.png for preview').getBoundingClientRect();- expect(pinned.contains(getButton('Collapse starred items'))).toBe(true);+ expect(pinned.contains(getStarredToggle(true))).toBe(true);expect(pinned.contains(getButton('Select starred.png for preview'))).toBe(true);expect(pinned.contains(getButton('Select regular.png for preview'))).toBe(false);expect(starredRect.top - (headerRect?.bottom ?? 0)).toBeLessThan(4);@@ -899,12 +914,12 @@ describe('GalleryImageGrid mixed item cells', () => {expect(getComputedStyle(pinned).borderBottomWidth).toBe('1px');expect(listingTop() - pinned.getBoundingClientRect().bottom).toBeCloseTo(GALLERY_PINNED_FOOTER_PX - 1, 0);- await click(getButton('Collapse starred items'));+ await click(getStarredToggle(true));expect(actionMocks.updateSettings).toHaveBeenCalledExactlyOnceWith({ starredSectionCollapsed: true });await renderGallery({ ...gallery, settings: { ...DENSE_SETTINGS, starredSectionCollapsed: true } });const collapsedPinned = host!.querySelector<HTMLElement>('[data-gallery-pinned]')!;- const collapsedHeaderRect = getButton('Expand starred items').parentElement?.getBoundingClientRect();+ const collapsedHeaderRect = getStarredToggle(false).parentElement?.getBoundingClientRect();expect(collapsedPinned.getBoundingClientRect().bottom - (collapsedHeaderRect?.bottom ?? 0)).toBeCloseTo(1, 0);expect(listingTop() - collapsedPinned.getBoundingClientRect().bottom).toBeCloseTo(GALLERY_PINNED_FOOTER_PX - 1, 0);@@ -919,7 +934,7 @@ describe('GalleryImageGrid mixed item cells', () => {}));- const trigger = getButton('Expand starred items');+ const trigger = getStarredToggle(false);expect(trigger.getAttribute('aria-expanded')).toBe('false');expect([...trigger.querySelectorAll<HTMLElement>('span')].some((span) => span.textContent === '4')).toBe(true);@@ -934,21 +949,21 @@ describe('GalleryImageGrid mixed item cells', () => {setStrip([]);await renderGallery(createGallery({ items: [createItem('image', 'regular.png')], settings: DENSE_SETTINGS }));- expect(host?.querySelector('button[aria-label="Expand starred items"]')).toBeNull();- expect(host?.querySelector('button[aria-label="Collapse starred items"]')).toBeNull();+ expect(findStarredToggle(false)).toBeNull();+ expect(findStarredToggle(true)).toBeNull();});it('shows the strip on paginated pages too, and no chrome when the strip is empty', async () => {setStrip([starred]);await renderGallery(createGallery({ items: [createItem('image', 'regular.png')] }));- expect(host?.querySelector('button[aria-label="Collapse starred items"]')).not.toBeNull();+ expect(findStarredToggle(true)).not.toBeNull();expect(sectionOrder()).toEqual(['starred', 'regular']);setStrip([]);await renderGallery(createGallery({ items: [createItem('image', 'regular.png')] }));- expect(host?.querySelector('button[aria-label="Collapse starred items"]')).toBeNull();+ expect(findStarredToggle(true)).toBeNull();expect(sectionOrder()).toEqual(['regular']);});@@ -972,7 +987,7 @@ describe('GalleryImageGrid mixed item cells', () => {setStrip([starred]);await renderGallery(createGallery({ items: [], settings: DENSE_SETTINGS }));- expect(getButton('Collapse starred items')).not.toBeNull();+ expect(getStarredToggle(true)).not.toBeNull();expect(host?.querySelector('button[aria-label="Select starred.png for preview"]')).not.toBeNull();expect(host?.querySelector('[role="button"]')).toBeNull();expect(host?.textContent).not.toContain('Drop media');diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsxindex f9314baddf..dfc10b9e63 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsx@@ -223,9 +223,9 @@ const GalleryStarredSectionHeader = ({return (<Flex align="center" gap="1" h={`${GALLERY_STARRED_HEADER_HEIGHT_PX}px`} px="1" w="full">+ {/* A disclosure named by its visible heading and count; aria-expanded carries the open state. */}<chakra.buttonaria-expanded={isOpen}- aria-label={t(isOpen ? 'widgets.gallery.collapseStarredItems' : 'widgets.gallery.expandStarredItems')}alignItems="center"color="fg.muted"display="flex"diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryItemSortMenu.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryItemSortMenu.tsxindex 5d1c0625bb..b66233f53a 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryItemSortMenu.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryItemSortMenu.tsx@@ -20,6 +20,7 @@ export const GalleryItemSortMenu = () => {// (wrapping `Menu.Trigger` swallows the anchor ref — see RoutingControl).const triggerId = useId();const triggerIds = useMemo(() => ({ trigger: triggerId }), [triggerId]);+ const orderLabel = imageOrderDir === 'DESC' ? t('widgets.gallery.newest') : t('widgets.gallery.oldest');const handleOrderDirChange = useCallback((event: { value: string }) => actions.updateSettings({ imageOrderDir: event.value as GalleryOrderDir }),@@ -30,8 +31,14 @@ export const GalleryItemSortMenu = () => {<Menu.Root ids={triggerIds} positioning={SORT_POSITIONING}><Tooltip content={t('widgets.gallery.sortBy')} ids={triggerIds}><Menu.Trigger asChild>- <Button aria-label={t('widgets.gallery.imageSort')} color="fg.muted" flexShrink={0} gap="1" variant="ghost">- {imageOrderDir === 'DESC' ? t('widgets.gallery.newest') : t('widgets.gallery.oldest')}+ <Button+ aria-label={t('widgets.gallery.imageSortValue', { order: orderLabel })}+ color="fg.muted"+ flexShrink={0}+ gap="1"+ variant="ghost"+ >+ {orderLabel}<Icon as={ChevronDownIcon} boxSize="3" /></Button></Menu.Trigger>diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryLayout.browser.test.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryLayout.browser.test.tsxindex cd11daace2..a8ba475333 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryLayout.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryLayout.browser.test.tsx@@ -435,7 +435,7 @@ describe('gallery layout shells', () => {);const filter = host?.querySelector<HTMLButtonElement>('[data-gallery-media-filter-menu]');const sortIndex = toolbarButtons.findIndex(- (button) => button.getAttribute('aria-label') === 'widgets.gallery.imageSort'+ (button) => button.getAttribute('aria-label') === 'widgets.gallery.imageSortValue');expect(filter, 'media filter did not render in the toolbar').not.toBeNull();diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryMediaSlot.browser.test.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryMediaSlot.browser.test.tsxindex e0a2440eb8..3c1edad515 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryMediaSlot.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryMediaSlot.browser.test.tsx@@ -180,7 +180,7 @@ const renderSlot = async (props: Partial<Parameters<typeof GalleryMediaSlot>[0]>await interact(() => root?.render(<Harness />));};-const trigger = () => host?.querySelector<HTMLButtonElement>('button[aria-label^="widgets.gallery.picker."]');+const trigger = () => host?.querySelector<HTMLButtonElement>('button[aria-haspopup="dialog"]');const actionButton = (key: string) =>[...(host?.querySelectorAll<HTMLButtonElement>('button') ?? [])].find((button) => button.textContent?.includes(key));const alertText = () => host?.querySelector('[role="alert"]')?.textContent ?? null;@@ -231,7 +231,9 @@ describe('GalleryMediaSlot', () => {it('opens the picker from the slot and hands back the picked item', async () => {await renderSlot();- expect(trigger()?.getAttribute('aria-label')).toBe('widgets.gallery.picker.chooseImage');+ await expect+ .element(trigger()!)+ .toHaveAccessibleName('widgets.gallery.picker.chooseImage widgets.gallery.picker.dropHint');await interact(() => trigger()?.click());const dialog = document.querySelector<HTMLElement>('[role="dialog"][data-state="open"]');@@ -260,6 +262,10 @@ describe('GalleryMediaSlot', () => {expect(mocks.getGalleryItemByRef).toHaveBeenCalledExactlyOnceWith(IMAGE_REF, expect.any(AbortSignal));expect(trigger()?.getAttribute('aria-busy')).toBe('true');+ // The spinner hides the label on screen, but the face keeps it in its name.+ await expect+ .element(trigger()!)+ .toHaveAccessibleName('widgets.gallery.picker.chooseImage widgets.gallery.picker.working');await interact(() => resolveItem?.(image('frame.png')));@@ -324,9 +330,10 @@ describe('GalleryMediaSlot', () => {await renderSlot({ value });- expect(trigger()?.getAttribute('aria-label')).toBe('widgets.gallery.picker.replaceImage');- expect(host?.textContent).toContain('chosen.png');- expect(host?.textContent).toContain('128 × 96');+ // Its visible name, size and replace hint name it (WCAG 2.5.3).+ await expect+ .element(trigger()!)+ .toHaveAccessibleName(/^chosen\.png\s*128 × 96\s*widgets\.gallery\.picker\.replace/);await interact(() => actionButton('widgets.gallery.picker.removeImage')?.click());@@ -444,6 +451,8 @@ describe('GalleryMediaSlot', () => {expect(icon.getBoundingClientRect().bottom).toBeLessThanOrEqual(label.getBoundingClientRect().top);await renderTile({ kind: 'image', name: 'cover.png' });+ // A bare thumbnail has no visible text, so the face keeps its action label.+ await expect.element(trigger()!).toHaveAccessibleName('widgets.gallery.picker.replaceImage');const remove = host?.querySelector<HTMLButtonElement>('button[aria-label="widgets.gallery.picker.removeImage"]');expect(remove).not.toBeNull();// Beside the face, never inside it.diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryMediaSlot.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryMediaSlot.tsxindex 0d3d0d2d86..dc97b553ab 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryMediaSlot.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryMediaSlot.tsx@@ -1,7 +1,7 @@import type { DragEndEvent } from '@dnd-kit/core';import type { GalleryItem, GalleryItemKind, GalleryItemRef } from '@features/gallery/core/items';-import { Box, HStack, Icon, Image, Spinner, Stack, Text } from '@chakra-ui/react';+import { Box, HStack, Icon, Image, Spinner, Stack, Text, VisuallyHidden } from '@chakra-ui/react';import { useDndMonitor } from '@dnd-kit/core';import { classifyGalleryUpload, getGalleryUploadAccept } from '@features/gallery/core/items';import { getGalleryItemByRef } from '@features/gallery/data/backend';@@ -291,7 +291,8 @@ export const GalleryMediaSlot = ({as="button"aria-busy={isBusy || undefined}aria-disabled={isInert || undefined}- aria-label={value ? labels.replace : labels.choose}+ // Only the bare thumbnail tile needs a label; every other face names itself with its visible text.+ aria-label={isTile && value ? labels.replace : undefined}aspectRatio={isTile ? 1 : undefined}cursor={disabled ? 'not-allowed' : undefined}// Busy stays focusable (`aria-disabled`): Remove hands focus here while the action runs.@@ -355,7 +356,11 @@ export const GalleryMediaSlot = ({) : (<Stack align="center" color="fg.muted" gap="1.5" justify="center" minH="20" px="4">{isBusy ? (- <Spinner size="lg" />+ <>+ {/* The spinner replaces the label on screen; the face's name keeps it ahead of "Working…". */}+ <VisuallyHidden>{labels.choose}</VisuallyHidden>+ <Spinner size="lg" />+ </>) : (<HStack color="fg" fontWeight="600" gap="1.5"><Icon as={ImagePlusIcon} boxSize="4" />diff --git a/invokeai/frontend/webv2/src/features/generation/ui/GenerateDimensionFields.browser.test.tsx b/invokeai/frontend/webv2/src/features/generation/ui/GenerateDimensionFields.browser.test.tsxindex d8fd6865b3..65bb183179 100644--- a/invokeai/frontend/webv2/src/features/generation/ui/GenerateDimensionFields.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/generation/ui/GenerateDimensionFields.browser.test.tsx@@ -30,7 +30,7 @@ void i18n.use(initReactI18next).init({resources: {en: {translation: {- common: { scrubber: { editValue: 'Edit {{label}}' } },+ common: { scrubber: { editValue: 'Edit {{label}}: {{value}}' } },widgets: {generate: {aspectRatio: 'Aspect ratio',diff --git a/invokeai/frontend/webv2/src/features/generation/ui/GenerateRenderSection.browser.test.tsx b/invokeai/frontend/webv2/src/features/generation/ui/GenerateRenderSection.browser.test.tsxindex 79ae3ab772..09da6f0651 100644--- a/invokeai/frontend/webv2/src/features/generation/ui/GenerateRenderSection.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/generation/ui/GenerateRenderSection.browser.test.tsx@@ -49,7 +49,7 @@ void i18n.use(initReactI18next).init({translation: {common: {newSeed: 'New seed',- scrubber: { editValue: 'Edit {{label}}' },+ scrubber: { editValue: 'Edit {{label}}: {{value}}' },seed: 'Seed',seedMode: {decrement: 'Decrement',diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/WorkflowWidgetView.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/WorkflowWidgetView.tsxindex b9ee6a53bc..f09a6a7867 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/WorkflowWidgetView.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/WorkflowWidgetView.tsx@@ -1,6 +1,7 @@-import { Box, HStack, Icon } from '@chakra-ui/react';+import { Box, HStack, Icon, VisuallyHidden } from '@chakra-ui/react';import { MiddleTruncate } from '@platform/ui/MiddleTruncate';import { WorkflowIcon } from 'lucide-react';+import { useTranslation } from 'react-i18next';import type { WorkflowWidgetViewProps } from './contracts';@@ -9,11 +10,14 @@ import { WorkflowLinearPanel } from './linear/WorkflowLinearPanel';import { useWorkflowProjectSelector } from './WorkflowUiContext';const WorkflowStatusBarItem = () => {+ const { t } = useTranslation();const workflowName = useWorkflowProjectSelector((project) => project.projectGraph.name);const isRunning = useWorkflowProjectSelector((project) => project.isWorkflowRunning);return (<HStack gap="1" maxW="14rem" minW="0" px="2">+ {/* The status-bar chip is named by its content; the name alone would not say which widget it is. */}+ <VisuallyHidden>{t('widgets.labels.workflow')}</VisuallyHidden><Icon as={WorkflowIcon} boxSize="3" color={isRunning ? 'brand.solid' : undefined} flexShrink={0} /><MiddleTruncate fontSize="xs" minW="0" text={workflowName || 'Untitled Workflow'} />{isRunning ? <Box bg="brand.solid" boxSize="1.5" flexShrink={0} rounded="full" /> : null}diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsxindex df585f98de..f503f81091 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsx@@ -974,7 +974,6 @@ const ImageCollectionInput = ({// The empty state keeps the drop target tall enough to hit and doubles as the picker trigger.<GalleryPickerPopover accept={IMAGE_ONLY} label={pickerLabel} selection={pickerSelection} onPick={onPick}><chakra.button- aria-label={pickerLabel}className="nodrag"display="block"h="20"@@ -1108,7 +1107,8 @@ const MediaInput = ({ id, invalid, kind, onChange, value }: WorkflowFieldInputPr<Box ref={setNodeRef} className="nodrag group" h="32" position="relative" rounded="sm" w="full"><GalleryPickerPopover accept={pickerAccept} label={pickerLabel} onPick={onPick}><chakra.button- aria-label={pickerLabel}+ // A chosen item shows only its thumbnail; the empty face names itself with its visible text.+ aria-label={mediaName ? pickerLabel : undefined}className="nodrag"display="block"h="full"diff --git a/invokeai/frontend/webv2/src/platform/i18n/translationKeys.test.ts b/invokeai/frontend/webv2/src/platform/i18n/translationKeys.test.tsindex 186a015985..7861b57537 100644--- a/invokeai/frontend/webv2/src/platform/i18n/translationKeys.test.ts+++ b/invokeai/frontend/webv2/src/platform/i18n/translationKeys.test.ts@@ -60,6 +60,19 @@ const I18N_KEY_PROP = new RegExp(String.raw`\bi18nKey\s*=\s*['"](${KEY_PATTERN})// `labelKey: 'a.b'` / `titleKey: 'a.b'` — keys held in const maps and passed to `t()` indirectly.const KEY_PROPERTY = new RegExp(String.raw`\b\w*[Kk]ey\s*:\s*['"](${KEY_PATTERN})['"]`, 'g');+// `t('a.b')` with no options: nothing can fill the value's `{{placeholders}}`.+const BARE_T_CALL = new RegExp(String.raw`\bt\(\s*['"](${KEY_PATTERN})['"]\s*\)`, 'g');++const readCatalogString = (key: string): string | undefined => {+ let value: unknown = en;++ for (const segment of key.split('.')) {+ value = typeof value === 'object' && value !== null ? (value as Record<string, unknown>)[segment] : undefined;+ }++ return typeof value === 'string' ? value : undefined;+};+const collectKeys = (source: string): string[] => {const found: string[] = [];@@ -96,4 +109,17 @@ describe('translation keys', () => {expect([...new Set(missing)].sort()).toEqual([]);});++ it('passes options wherever the English value interpolates', () => {+ // A key shared by an interpolating caller and a bare one renders the literal `{{name}}` at the bare call.+ const unfilled = Object.entries(sourceModules)+ .filter(([path]) => !isTestModule(path))+ .flatMap(([path, source]) =>+ [...(source as string).matchAll(BARE_T_CALL)].flatMap(([, key]) =>+ key && readCatalogString(key)?.includes('{{') ? [`${key} (${path.replace('../../', 'src/')})`] : []+ )+ );++ expect([...new Set(unfilled)].sort()).toEqual([]);+ });});diff --git a/invokeai/frontend/webv2/src/platform/ui/ColorPicker.browser.test.tsx b/invokeai/frontend/webv2/src/platform/ui/ColorPicker.browser.test.tsxindex 12494fba62..c0646cd33f 100644--- a/invokeai/frontend/webv2/src/platform/ui/ColorPicker.browser.test.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/ColorPicker.browser.test.tsx@@ -19,7 +19,7 @@ void i18n.use(initReactI18next).init({translation: {common: {colorPicker: {- format: 'Color format',+ format: 'Color format: {{format}}',opacity: 'Opacity (%)',sampleFromCanvas: 'Pick a color from the canvas',sampleFromScreen: 'Pick a color from the screen',@@ -148,9 +148,11 @@ describe('ColorPicker', () => {const { onChange, trigger } = await renderPicker({ initialValue: '#ff0000', swatches: false });await openPicker(trigger);- const formatTrigger = () => document.querySelector<HTMLButtonElement>('[aria-label="Color format"]')!;+ const formatTrigger = () => document.querySelector<HTMLButtonElement>('[aria-label^="Color format"]')!;expect(formatTrigger().textContent).toBe('HEX');+ // The name carries the visible format (WCAG 2.5.3).+ await expect.element(formatTrigger()).toHaveAccessibleName('Color format: HEX');expect(queryChannelInputs()).toHaveLength(1);await interact(() => formatTrigger().click());diff --git a/invokeai/frontend/webv2/src/platform/ui/ColorPicker.tsx b/invokeai/frontend/webv2/src/platform/ui/ColorPicker.tsxindex fbcf514bd1..125be58160 100644--- a/invokeai/frontend/webv2/src/platform/ui/ColorPicker.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/ColorPicker.tsx@@ -85,7 +85,7 @@ const FormatTrigger = ({return (<IconButton- aria-label={t('common.colorPicker.format')}+ aria-label={t('common.colorPicker.format', { format: format.toUpperCase() })}flexShrink="0"fontSize="xs"fontWeight="medium"diff --git a/invokeai/frontend/webv2/src/platform/ui/ScrubberField.browser.test.tsx b/invokeai/frontend/webv2/src/platform/ui/ScrubberField.browser.test.tsxindex 2633035f0e..667f5a30da 100644--- a/invokeai/frontend/webv2/src/platform/ui/ScrubberField.browser.test.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/ScrubberField.browser.test.tsx@@ -15,7 +15,7 @@ const i18n = i18next.createInstance();await i18n.use(initReactI18next).init({fallbackLng: 'en',lng: 'en',- resources: { en: { translation: { common: { scrubber: { editValue: 'Edit {{label}}' } } } } },+ resources: { en: { translation: { common: { scrubber: { editValue: 'Edit {{label}}: {{value}}' } } } } },});let host: HTMLDivElement | null = null;@@ -138,7 +138,8 @@ describe('ScrubberField', () => {expect(slider.getAttribute('aria-valuenow')).toBe('30');expect(slider.getAttribute('aria-valuetext')).toBe('30%');expect(valueButton()?.textContent).toBe('30%');- expect(valueButton()?.getAttribute('aria-label')).toBe('Edit Steps');+ // The name carries the visible value (WCAG 2.5.3).+ await expect.element(valueButton()!).toHaveAccessibleName('Edit Steps: 30%');});it('fills the frame at the maximum and still frames the thumb at the minimum', async () => {diff --git a/invokeai/frontend/webv2/src/platform/ui/ScrubberField.tsx b/invokeai/frontend/webv2/src/platform/ui/ScrubberField.tsxindex 75e3c8a7d8..dff064ad73 100644--- a/invokeai/frontend/webv2/src/platform/ui/ScrubberField.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/ScrubberField.tsx@@ -746,7 +746,7 @@ export const ScrubberField = ({) : (<buttonref={observeText}- aria-label={t('common.scrubber.editValue', { label })}+ aria-label={t('common.scrubber.editValue', { label, value: formatted })}data-part="value"disabled={disabled}// One tab stop per field: the slider opens the editor with Enter or a digit.diff --git a/invokeai/frontend/webv2/src/platform/ui/StatusWidgetChip.tsx b/invokeai/frontend/webv2/src/platform/ui/StatusWidgetChip.tsxindex 529736f6e4..2a1bcd653a 100644--- a/invokeai/frontend/webv2/src/platform/ui/StatusWidgetChip.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/StatusWidgetChip.tsx@@ -1,7 +1,16 @@import type { LucideIcon } from 'lucide-react';import type { ReactNode } from 'react';-import { Box, HStack, Icon, Text, type RecipeVariantProps, type SystemStyleObject, useRecipe } from '@chakra-ui/react';+import {+ Box,+ HStack,+ Icon,+ Text,+ type RecipeVariantProps,+ type SystemStyleObject,+ useRecipe,+ VisuallyHidden,+} from '@chakra-ui/react';import { chipRecipe } from '@theme/recipes';/** Presence turns on the bar; a null `value` renders it as a full quiet fill. */@@ -37,11 +46,17 @@ const PROGRESS_SWEEP_SX: SystemStyleObject = {export const StatusWidgetChip = ({children,+ hiddenLabel,icon,progress,tone,}: {children: ReactNode;+ /**+ * The widget's name, read before the status when the visible text does not say it ("Queue idle" for Queue status).+ * A status-bar chip is named by its content, so this keeps every chip's name starting with its widget.+ */+ hiddenLabel?: string;icon: LucideIcon;/** Optional live progress, drawn as a hairline along the chip's bottom edge. */progress?: StatusWidgetChipProgress;@@ -51,6 +66,7 @@ export const StatusWidgetChip = ({return (<HStack css={recipe({ tone })} position={progress ? 'relative' : undefined}>+ {hiddenLabel ? <VisuallyHidden>{hiddenLabel}</VisuallyHidden> : null}<Icon as={icon} boxSize="3" /><Text whiteSpace="nowrap">{children}</Text>{progress ? (diff --git a/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsx b/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsxindex 7473a60262..7f21bb541b 100644--- a/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsx+++ b/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsx@@ -349,10 +349,11 @@ const CompactBottomWidget = ({const tooltipContent = useMemo(() => (item.instance ? <BottomWidgetTooltipContent item={item} /> : null), [item]);const isRowActive = item.isPopover ? isPopoverOpen : isActive;+ // Named by its compact content, which shows (or visually hides) the widget's name: an aria-label would+ // replace the visible status text that speech-input users read off the chip (WCAG 2.5.3).const row = (<Row{...rowDragHandleProps}- aria-label={item.label}aria-pressed={item.isPopover ? undefined : isRowActive}color={isRowActive ? undefined : 'fg.muted'}cursor={isDragging ? 'grabbing' : 'default'}diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/InvokeButton.browser.test.tsx b/invokeai/frontend/webv2/src/workbench/shell/topbar/InvokeButton.browser.test.tsxindex abaa3d74b6..c85c93d0b2 100644--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/InvokeButton.browser.test.tsx+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/InvokeButton.browser.test.tsx@@ -140,7 +140,8 @@ describe('InvokeButton icon slot', () => {const { button } = await renderInvokeButton({ invoke, isPreparing: true });expect(button.getAttribute('aria-disabled')).toBe('true');- expect(button.getAttribute('aria-label')).toBe('topbar.invoke.preparing');+ await expect.element(button).toHaveAccessibleName('topbar.invoke.invoke');+ await expect.element(button).toHaveAccessibleDescription('topbar.invoke.preparing');expect(hasSpinner(button)).toBe(true);await act(() => button.click());@@ -173,6 +174,11 @@ describe('InvokeButton front of queue', () => {isValid: false,});+ // The visible label names it (WCAG 2.5.3); the blocking reason describes it.+ expect(button.getAttribute('aria-disabled')).toBe('true');+ await expect.element(button).toHaveAccessibleName('topbar.invoke.invoke');+ await expect.element(button).toHaveAccessibleDescription('topbar.invoke.unavailable');+// Dispatched: a blocked Invoke is not actionable for a pointer driver.await act(() => button.dispatchEvent(new MouseEvent('click', { bubbles: true })));await act(() => button.dispatchEvent(new MouseEvent('click', { bubbles: true, shiftKey: true })));@@ -185,9 +191,13 @@ describe('InvokeButton front of queue', () => {'app.invoke': { aria: 'Control+Enter', display: 'Ctrl+Enter', parts: ['ctrl', 'enter'] },'app.invokeFront': frontBinding,};+ // Wide enough for the keycap hint.+ await page.viewport(1440, 900);const { button } = await renderInvokeButton();expect(button.getAttribute('aria-keyshortcuts')).toBe('Control+Enter Control+Shift+Enter');+ // The keycap hint shows at this width but stays out of the name; aria-keyshortcuts carries the binding.+ await expect.element(button).toHaveAccessibleName('topbar.invoke.invoke');await act(() => userEvent.hover(button));await expect.element(page.getByText('topbar.invoke.invokeFrontHint: Ctrl+Shift+Enter')).toBeVisible();diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/InvokeButton.tsx b/invokeai/frontend/webv2/src/workbench/shell/topbar/InvokeButton.tsxindex b69721a6a9..5ede2187fd 100644--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/InvokeButton.tsx+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/InvokeButton.tsx@@ -2,7 +2,7 @@ import type { FocusEvent, MouseEvent } from 'react';import { Box, HStack, Icon, Kbd, ProgressCircle, Separator, Spinner, Stack, Text } from '@chakra-ui/react';import { getDeterminateProgressFraction } from '@features/queue/contracts';-import { Button } from '@platform/ui/Button';+import { Button, useUnavailableControl } from '@platform/ui/Button';import { Tooltip } from '@platform/ui/Tooltip';import { getDestinationLabel } from '@workbench/invocation';import { useActiveQueueProgress } from '@workbench/queue-integration/useActiveQueueProgress';@@ -76,6 +76,15 @@ export const InvokeButton = ({ state }: { state: InvocationState }) => {[invoke]);const canInvoke = isValid && !isPreparing;+ // The visible text names the button; why it cannot run now is its description.+ const unavailable = useUnavailableControl(+ canInvoke+ ? undefined+ : isPreparing+ ? t('topbar.invoke.preparing')+ : t('topbar.invoke.unavailable', { reason: blockingReasons[0] ?? t('topbar.invoke.unrunnable') }),+ undefined+ );const iconMode = isPreparing? ({ mode: 'progress', value: null } as const)@@ -88,17 +97,8 @@ export const InvokeButton = ({ state }: { state: InvocationState }) => {return (<Tooltip content={tooltipContent} contentProps={TOOLTIP_CONTENT_PROPS} openDelay={200} showArrow><Button- aria-disabled={!canInvoke}+ {...unavailable?.props}aria-keyshortcuts={ariaKeyShortcuts}- aria-label={- canInvoke- ? t('topbar.invoke.invoke')- : isPreparing- ? t('topbar.invoke.preparing')- : t('topbar.invoke.unavailable', {- reason: blockingReasons[0] ?? t('topbar.invoke.unrunnable'),- })- }colorPalette="brand"css={INVOKE_BUTTON_CSS}cursor={canInvoke ? undefined : 'not-allowed'}@@ -112,7 +112,8 @@ export const InvokeButton = ({ state }: { state: InvocationState }) => {onPointerLeave={handlePointerLeave}zIndex="2">- <Box alignItems="center" boxSize="3.5" display="flex" justifyContent="center" position="relative">+ {/* Decorative: the queue's progress has its own status surfaces, and it must not change the button's name. */}+ <Box aria-hidden alignItems="center" boxSize="3.5" display="flex" justifyContent="center" position="relative">{iconMode.mode === 'play' ? (<Icon as={PlayIcon} boxSize="3.5" />) : iconMode.value === null ? (@@ -128,8 +129,10 @@ export const InvokeButton = ({ state }: { state: InvocationState }) => {)}</Box>{t('topbar.invoke.invoke')}+ {unavailable?.description}{shortcutParts ? (- <Kbd css={HIDE_BELOW_HINT_WIDTH} variant="outline" borderColor={SHORTCUT_BORDER} color="inherit">+ // Out of the name, which stays "Invoke" at every width; aria-keyshortcuts announces the binding.+ <Kbd aria-hidden css={HIDE_BELOW_HINT_WIDTH} variant="outline" borderColor={SHORTCUT_BORDER} color="inherit"><TopbarShortcutKeys parts={shortcutParts} /></Kbd>) : null}diff --git a/invokeai/frontend/webv2/src/workbench/widget-frame/README.md b/invokeai/frontend/webv2/src/workbench/widget-frame/README.mdindex dc4cce2b45..042b671236 100644--- a/invokeai/frontend/webv2/src/workbench/widget-frame/README.md+++ b/invokeai/frontend/webv2/src/workbench/widget-frame/README.md@@ -43,7 +43,7 @@ Workbench focus is transient, never persisted. `WorkbenchFocusProvider` (`workbe## Contextual shortcut guidance-Shortcuts is a bottom-only popover widget. Built-in layouts put it on right immediately before Notifications; saved and custom layouts keep their placements and can enable it through Bottom Widgets. Whole chip opens its guide; normal widget controls own reordering, alignment, visibility and dismissal. Its `compactSizing` metadata asks status-bar host for remaining capacity: host observes its strip, two clusters and spacer; guide measures only its own keycaps. Up to four whole hints fit without increasing status bar height; a keyboard icon keeps access when no hint or label fits. If all relevant bindings are unassigned, popover explains that state and provides keyboard shortcut settings.+Shortcuts is a bottom-only popover widget. Built-in layouts put it on right immediately before Notifications; saved and custom layouts keep their placements and can enable it through Bottom Widgets. Whole chip opens its guide; normal widget controls own reordering, alignment, visibility and dismissal. Its `compactSizing` metadata asks status-bar host for remaining capacity: host observes its strip, two clusters and spacer; guide measures only its own keycaps. Up to four whole hints fit without increasing status bar height; a keyboard icon keeps access when no hint or label fits. Status-bar chips take their accessible name from compact content, never a host `aria-label`, so speech-input users can say the status they see (WCAG 2.5.3 Label in Name). Once its view loads (until then its busy fallback reads "Loading <label>"), every chip's name starts with its widget's label: a compact view whose status text does not say it ("Queue idle", a workflow's name) passes `StatusWidgetChip` a `hiddenLabel` or renders the label visually hidden. The guide's name is only "Shortcuts": its preview hints are `aria-hidden`, so a voice command for a hint cannot land on the chip, and the popover lists them. The `workbench-status-bar-names` accessibility journey enables every bottom widget and checks each chip's name. If all relevant bindings are unassigned, popover explains that state and provides keyboard shortcut settings.Workbench focus lifecycle also owns transient hint-source registry and last editing element. A keyed Canvas registration mounts one stable source for its project/instance engine lease; changing generation/staging locks publish through a boolean-filtered project subscription, not by replacing that source. Lock reads cache document revision, staged-candidate array and queue-item array; unrelated project updates do not rescan queue work. Lock predicate tests candidate presence and active work without constructing staging slots. Narrow tool/session subscriptions cache scalar hint inputs; guide never acquires an engine lease or imports property forms. Sources are fenced by project and instance and released with their owner. Project/account changes clear editing origin. Widget's `preserveWorkbenchFocus` metadata keeps its compact chip and portal from replacing that origin; closing returns focus there. Guide activation and Escape do not reach Canvas session handlers; configured global chords keep normal runtime handling.diff --git a/invokeai/frontend/webv2/src/workbench/widgets/canvas/CanvasHeaderActions.tsx b/invokeai/frontend/webv2/src/workbench/widgets/canvas/CanvasHeaderActions.tsxindex ee63b3483e..e59e185d97 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/canvas/CanvasHeaderActions.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/canvas/CanvasHeaderActions.tsx@@ -88,6 +88,7 @@ const CanvasHeaderActionsInner = ({const { t } = useTranslation();const notify = useNotify();const zoom = useCanvasZoom(engine);+ const zoomLabel = formatZoomPercent(zoom);const canUndo = useCanvasCanUndo(engine);const canRedo = useCanvasCanRedo(engine);const editingLocked = useCanvasDocumentEditingLocked(engine);@@ -161,9 +162,15 @@ const CanvasHeaderActionsInner = ({<HStack gap="0.5"><Menu.Root positioning={MENU_POSITIONING}><Menu.Trigger asChild>- <IconButton aria-label={t('widgets.canvas.controls.zoomLevel')} minW="4rem" px="2" size="sm" variant="ghost">+ <IconButton+ aria-label={t('widgets.canvas.controls.zoomLevel', { zoom: zoomLabel })}+ minW="4rem"+ px="2"+ size="sm"+ variant="ghost"+ ><HStack gap="1">- <Text fontVariantNumeric="tabular-nums">{formatZoomPercent(zoom)}</Text>+ <Text fontVariantNumeric="tabular-nums">{zoomLabel}</Text><ChevronDownIcon size={12} /></HStack></IconButton>@@ -173,7 +180,7 @@ const CanvasHeaderActionsInner = ({<MenuContent minW="7rem" py="1">{ZOOM_OPTIONS.map((option) => (<Menu.Item key={option.value} value={option.label} onClick={() => setZoom(option.value)}>- <CheckIcon size={12} opacity={formatZoomPercent(zoom) === option.label ? 1 : 0} />+ <CheckIcon size={12} opacity={zoomLabel === option.label ? 1 : 0} /><Menu.ItemText>{option.label}</Menu.ItemText></Menu.Item>))}diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/panes/ColorPane.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/panes/ColorPane.tsxindex 3604b47054..75ed29c1d5 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/panes/ColorPane.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/panes/ColorPane.tsx@@ -370,7 +370,7 @@ const ChannelFields = ({return (<Flex gap="1" wrap="wrap"><chakra.button- aria-label={t('widgets.layers.colorPane.format')}+ aria-label={t('widgets.layers.colorPane.format', { format: format.toUpperCase() })}color="fg.muted"flexShrink={0}fontSize="xs"diff --git a/invokeai/frontend/webv2/src/workbench/widgets/queue-status/QueueStatusWidgetView.tsx b/invokeai/frontend/webv2/src/workbench/widgets/queue-status/QueueStatusWidgetView.tsxindex 42226d798e..64903e97e6 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/queue-status/QueueStatusWidgetView.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/queue-status/QueueStatusWidgetView.tsx@@ -45,6 +45,7 @@ export const QueueStatusWidgetView = ({ presentation }: WidgetViewProps) => {return (<StatusWidgetChip+ hiddenLabel={t('widgets.labels.queueStatus')}icon={chip.tone === 'paused' ? PauseIcon : ListOrderedIcon}progress={getQueueStatusProgress(chip, progress?.percentage)}>diff --git a/invokeai/frontend/webv2/src/workbench/widgets/server-status/ServerStatusWidgetView.tsx b/invokeai/frontend/webv2/src/workbench/widgets/server-status/ServerStatusWidgetView.tsxindex fe7d6701ad..8f1945ce22 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/server-status/ServerStatusWidgetView.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/server-status/ServerStatusWidgetView.tsx@@ -34,11 +34,15 @@ export const ServerStatusWidgetView = ({ presentation }: WidgetViewProps) => {if (isDisconnected) {return (- <StatusWidgetChip icon={CircleXIcon} tone="error">+ <StatusWidgetChip hiddenLabel={t('widgets.labels.serverStatus')} icon={CircleXIcon} tone="error">{label}</StatusWidgetChip>);}- return <StatusWidgetChip icon={PlugZapIcon}>{label}</StatusWidgetChip>;+ return (+ <StatusWidgetChip hiddenLabel={t('widgets.labels.serverStatus')} icon={PlugZapIcon}>+ {label}+ </StatusWidgetChip>+ );};diff --git a/invokeai/frontend/webv2/src/workbench/widgets/shortcuts/ShortcutGuide.browser.test.tsx b/invokeai/frontend/webv2/src/workbench/widgets/shortcuts/ShortcutGuide.browser.test.tsxindex ee823b9659..ca5d6b50f4 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/shortcuts/ShortcutGuide.browser.test.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/shortcuts/ShortcutGuide.browser.test.tsx@@ -61,6 +61,9 @@ import { StatusBar } from '@workbench/shell/StatusBar';import { ShortcutGuide } from './ShortcutGuide';+/** The chip is named by its content: only the guide's name, never the preview hints. */+const SHORTCUTS_CHIP = { exact: true, name: 'Shortcuts' };+const widgetWidths = createExternalStore<Record<string, number>>({});vi.mock('@workbench/widget-frame', async (importOriginal) => ({@@ -210,8 +213,10 @@ describe('contextual status-bar guide', () => {await act(() => root!.unmount());root = createRoot(host!);await render();- const guide = page.getByRole('button', { name: 'Shortcuts', exact: true });+ const guide = page.getByRole('button', SHORTCUTS_CHIP);expect(guide.element().textContent).toContain('Invoke');+ // The preview hints stay out of the name, so a voice command for a hint cannot land on the chip.+ await expect.element(guide).toHaveAccessibleName('Shortcuts');expect(guide.element().textContent).not.toContain('Cancel generation');expect(guide.element().textContent).not.toContain('Command palette');const parts = [...guide.element().querySelectorAll('[data-shortcut-guide] > :last-child kbd')].map(@@ -236,7 +241,7 @@ describe('contextual status-bar guide', () => {await act(() => root!.unmount());root = createRoot(host!);await render();- const guide = page.getByRole('button', { name: 'Shortcuts', exact: true });+ const guide = page.getByRole('button', SHORTCUTS_CHIP);await guide.click();await expect.poll(() => page.getByRole('dialog').element().textContent)@@ -275,7 +280,7 @@ describe('contextual status-bar guide', () => {await page.viewport(700, 600);await render(700);const footer = host!.querySelector('footer')!;- const guide = page.getByRole('button', { name: 'Shortcuts', exact: true });+ const guide = page.getByRole('button', SHORTCUTS_CHIP);const notification = host!.querySelector('[data-status-bar-widget="notifications"]')!;await expect.poll(() => footer.scrollWidth).toBeLessThanOrEqual(footer.clientWidth);await expect.poll(() => notification.getBoundingClientRect().right).toBeLessThanOrEqual(700);@@ -283,7 +288,9 @@ describe('contextual status-bar guide', () => {await act(() => widgetWidths.setSnapshot({ ...widgetWidths.getSnapshot(), 'server-status': 250 }));await render(700);await expect.poll(() => guide.element().getBoundingClientRect().width).toBeLessThanOrEqual(24);- expect(guide.element().querySelector('[data-shortcut-guide]')?.lastElementChild?.textContent).toBe('');+ // Icon only: the visible label is gone, and its hidden copy keeps the chip's name.+ expect(guide.element().querySelector('[data-shortcut-guide]')?.lastElementChild?.querySelector('p')).toBeNull();+ await expect.element(guide).toHaveAccessibleName('Shortcuts');expect(notification.getBoundingClientRect().right).toBeLessThanOrEqual(700);await guide.click();await expect.element(page.getByRole('dialog')).toBeVisible();@@ -301,10 +308,12 @@ describe('contextual status-bar guide', () => {await expect.poll(() => host!.textContent).toContain('Brush');await page.viewport(220, 600);await render(220);- const guide = page.getByRole('button', { name: 'Shortcuts', exact: true });+ const guide = page.getByRole('button', SHORTCUTS_CHIP);await expect.poll(() => host!.querySelector('[data-hint-measurements]')?.nextElementSibling?.textContent).toBe('Shortcuts');+ // The visible fallback label is the whole name, not repeated by the hidden one.+ await expect.element(guide).toHaveAccessibleName('Shortcuts');await guide.click();const popup = page.getByRole('dialog');await expect.element(popup).toBeVisible();@@ -332,7 +341,7 @@ describe('contextual status-bar guide', () => {it('labels properties guidance, keeps it through editable focus, hides beneath modals and forgets a switched project', async () => {await page.getByRole('textbox', { name: 'Property field' }).click();- await page.getByRole('button', { name: 'Shortcuts', exact: true }).click();+ await page.getByRole('button', SHORTCUTS_CHIP).click();await expect.poll(() => page.getByRole('dialog').element().textContent).toContain('On Canvas · Brush');await userEvent.keyboard('{Escape}');await expect.element(page.getByRole('textbox', { name: 'Property field' })).toHaveFocus();@@ -340,13 +349,13 @@ describe('contextual status-bar guide', () => {releaseModal = registerModalPresence();});await expect.poll(() => host!.querySelector('[data-status-bar-widget="shortcuts"]')).toBeNull();- await expect.element(page.getByRole('button', { name: 'Shortcuts', exact: true })).not.toBeInTheDocument();+ await expect.element(page.getByRole('button', SHORTCUTS_CHIP)).not.toBeInTheDocument();await act(() => {releaseModal!();releaseModal = null;});- await expect.element(page.getByRole('button', { name: 'Shortcuts', exact: true })).toBeVisible();- await page.getByRole('button', { name: 'Shortcuts', exact: true }).click();+ await expect.element(page.getByRole('button', SHORTCUTS_CHIP)).toBeVisible();+ await page.getByRole('button', SHORTCUTS_CHIP).click();await expect.poll(() => page.getByRole('dialog').element().textContent).toContain('On Canvas · Brush');await userEvent.keyboard('{Escape}');await expect.element(page.getByRole('textbox', { name: 'Property field' })).toHaveFocus();@@ -386,7 +395,7 @@ describe('contextual status-bar guide', () => {await page.getByRole('textbox', { name: 'Canvas field' }).click();await act(() => (document.activeElement as HTMLElement).blur());expect(document.activeElement).toBe(document.body);- const guide = page.getByRole('button', { name: 'Shortcuts', exact: true });+ const guide = page.getByRole('button', SHORTCUTS_CHIP);await act(() => (guide.element() as HTMLElement).focus());await userEvent.keyboard('{Enter}');await expect.element(page.getByRole('dialog')).toBeVisible();@@ -400,19 +409,19 @@ describe('contextual status-bar guide', () => {root = createRoot(host!);await render(900, false);await page.getByRole('textbox', { name: 'Canvas field' }).click();- await page.getByRole('button', { name: 'Shortcuts', exact: true }).click();+ await page.getByRole('button', SHORTCUTS_CHIP).click();const popup = page.getByRole('dialog');await expect.poll(() => popup.element().textContent).toContain('Workbench');expect(popup.element().textContent).not.toContain('On Canvas');await userEvent.keyboard('{Escape}');await page.getByRole('textbox', { name: 'Property field' }).click();- await page.getByRole('button', { name: 'Shortcuts', exact: true }).click();+ await page.getByRole('button', SHORTCUTS_CHIP).click();await expect.poll(() => page.getByRole('dialog').element().textContent).toContain('Workbench');expect(page.getByRole('dialog').element().textContent).not.toContain('On Canvas');});it('runs configured global shortcuts from the compact chip and its popover without activating the chip for modified Enter', async () => {- const guide = page.getByRole('button', { name: 'Shortcuts', exact: true });+ const guide = page.getByRole('button', SHORTCUTS_CHIP);await act(() => (guide.element() as HTMLElement).focus());await userEvent.keyboard('{Control>}{Shift>}j{/Shift}{/Control}');await expect.poll(() => executed).toEqual(['app.invoke']);diff --git a/invokeai/frontend/webv2/src/workbench/widgets/shortcuts/ShortcutGuide.tsx b/invokeai/frontend/webv2/src/workbench/widgets/shortcuts/ShortcutGuide.tsxindex fbe1a31df8..bfd6336a32 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/shortcuts/ShortcutGuide.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/shortcuts/ShortcutGuide.tsx@@ -3,7 +3,7 @@ import type { ShortcutHint, ShortcutHintSnapshot } from '@workbench/hotkeys/hintimport type { ResolvedShortcutHint } from '@workbench/hotkeys/shortcutHints';import type { WidgetViewProps } from '@workbench/widgetContracts';-import { Box, Flex, Icon, Popover, Stack, Text, usePopoverContext } from '@chakra-ui/react';+import { Box, Flex, Icon, Popover, Stack, Text, usePopoverContext, VisuallyHidden } from '@chakra-ui/react';import { Button } from '@platform/ui';import { useCurrentWorkbenchFocusTarget } from '@workbench/focusRegions';import { firstPartyHotkeyCatalog } from '@workbench/hotkeys/catalog';@@ -126,7 +126,15 @@ const ConnectedShortcutGuide = ({const Hint = ({ hint, compact = false }: { hint: ResolvedShortcutHint; compact?: boolean }) => {const { t } = useTranslation();return (- <Flex align="center" flexShrink={0} gap="1" whiteSpace={compact ? 'nowrap' : undefined}>+ // Compact hints are a visual preview inside the status-bar chip, whose name stays "Shortcuts"; the popover lists+ // the same hints for assistive technology.+ <Flex+ aria-hidden={compact || undefined}+ align="center"+ flexShrink={0}+ gap="1"+ whiteSpace={compact ? 'nowrap' : undefined}+ >{hint.parts.length > 0 ? <ShortcutKeycaps parts={hint.parts} /> : null}{hint.pointerKey ? (<Text as="span" fontSize="xs">@@ -269,8 +277,13 @@ export const ShortcutGuideContent = ({))}</Flex><Flex align="center" gap="2" h="full" justify="flex-start" minW="0">+ {/* The status-bar chip takes its name from this content: the guide's name, whether its visible label, the+ preview hints, or only the icon show. */}+ {visibleCount > 0 || !showFallbackLabel ? (+ <VisuallyHidden>{t('workbench.shortcuts.title')}</VisuallyHidden>+ ) : null}{visibleCount > 0 ? (- <Text color="fg.muted" flexShrink={0} fontSize="xs">+ <Text aria-hidden color="fg.muted" flexShrink={0} fontSize="xs">{title}</Text>) : (