Skip to content

[harness eval #34749] Docs: Add ariaLabel support to ActionItem interface#29

Open
valentinpalkovic wants to merge 2 commits into
nextfrom
try-pr-34749
Open

[harness eval #34749] Docs: Add ariaLabel support to ActionItem interface#29
valentinpalkovic wants to merge 2 commits into
nextfrom
try-pr-34749

Conversation

@valentinpalkovic
Copy link
Copy Markdown
Owner

Synthetic fork PR for agentic harness eval against storybookjs#34749.

@valentinpalkovic valentinpalkovic added the ci:verify Trigger PR Verification Harness label May 14, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 14, 2026

Fails
🚫

PR is not labeled with one of: ["cleanup","BREAKING CHANGE","feature request","bug","documentation","maintenance","build","dependencies"]

🚫

PR is not labeled with one of: ["ci:normal","ci:merged","ci:daily","ci:docs"]

🚫 PR title must be in the format of "Area: Summary", With both Area and Summary starting with a capital letter Good examples: - "Docs: Describe Canvas Doc Block" - "Svelte: Support Svelte v4" Bad examples: - "add new api docs" - "fix: Svelte 4 support" - "Vue: improve docs"

Generated by 🚫 dangerJS against 5f2c069

github-actions Bot pushed a commit that referenced this pull request May 14, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-14T13-51-46.894Z/pr-29-ActionBar-ariaLabel-propagates-to-action-buttons-chromium/test-failed-1.png

2026-05-14T13-51-46.894Z/pr-29-ActionBar-ariaLabel-propagates-to-action-buttons-chromium/test-failed-1.png

@valentinpalkovic valentinpalkovic force-pushed the next branch 3 times, most recently from fe2f521 to e537022 Compare May 14, 2026 14:09
@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 14, 2026
github-actions Bot pushed a commit that referenced this pull request May 14, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Reason: Playwright assertion failed in: ? — Error: expect(locator).toBeVisible() failed Locator: locator('#storybook-preview-iframe').contentFrame().getByRole('button', { name: /show code/i }).first() Expected: visible Timeout: 15000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 15000ms - waiting for locator('#storybook-preview-iframe').contentFrame().getByRole('button', { name: /show code/i }).first()

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-14T14-25-19.686Z/pr-29-docs-ActionBar-rende-093ca-ter-ariaLabel-prop-addition-chromium/test-failed-1.png

2026-05-14T14-25-19.686Z/pr-29-docs-ActionBar-rende-093ca-ter-ariaLabel-prop-addition-chromium/test-failed-1.png

@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 14, 2026
github-actions Bot pushed a commit that referenced this pull request May 14, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Reason: Playwright assertion failed in: ? — Error: expect(locator).toBeVisible() failed Locator: locator('#storybook-preview-iframe').contentFrame().getByRole('button', { name: /show code/i }).first() Expected: visible Timeout: 15000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 15000ms - waiting for locator('#storybook-preview-iframe').contentFrame().getByRole('button', { name: /show code/i }).first()

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-14T14-39-51.346Z/pr-29-docs-Canvas-ActionBa-22721-de-action-button-accessibly-chromium/test-failed-1.png

2026-05-14T14-39-51.346Z/pr-29-docs-Canvas-ActionBa-22721-de-action-button-accessibly-chromium/test-failed-1.png

@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 15, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target react-vite/default-ts)

Reason: boot failure (see regressionDetails)

Compile output (last 4KB)
Error: ENOENT: no such file or directory, mkdir '/home/runner/work/_temp/storybook-sandboxes/react-vite-default-ts/.verify-snapshot'
    at async mkdir (node:internal/fs/promises:855:10)
    at async snapshotSandbox (file:///home/runner/work/_temp/pr-head/scripts/verify/sandbox.ts:40:3)
    at async main (file:///home/runner/work/_temp/pr-head/scripts/verify-pr.ts:284:7)

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

@valentinpalkovic valentinpalkovic force-pushed the next branch 4 times, most recently from a11176d to 9de9d5b Compare May 15, 2026 17:25
@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 15, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

No verdict produced — the workflow failed before the harness ran (likely recipe-author dispatch, deny-regex, or lint). See run log for details.

@valentinpalkovic valentinpalkovic removed the ci:verify Trigger PR Verification Harness label May 15, 2026
github-actions Bot pushed a commit that referenced this pull request May 15, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Reason: Playwright assertion failed in: ? — TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('#storybook-preview-iframe').contentFrame().locator('#storybook-root:visible, #storybook-docs:visible').locator(':scope > *').first() at _util.ts:31 29 | await this.page.waitForURL((url) => url.search.includes('path')); 30 | const root = this.previewRoot(); > 31 | await root.locator(':s

PR-added unit tests: ✅ passed — 6712 passed, 0 failed across 2118 suite(s)

Files: code/addons/vitest/src/vitest-plugin/agent-telemetry-reporter.test.ts, code/core/src/common/js-package-manager/NPMProxy.test.ts, code/core/src/common/js-package-manager/PNPMProxy.test.ts, code/core/src/common/js-package-manager/Yarn1Proxy.test.ts, code/core/src/common/js-package-manager/Yarn2Proxy.test.ts, code/core/src/core-server/server-channel/ai-setup-channel.test.ts, code/core/src/core-server/server-channel/ghost-stories-channel.test.ts, code/core/src/core-server/utils/checklist.test.ts, code/core/src/core-server/utils/ghost-stories/parse-vitest-report.test.ts, code/core/src/core-server/withTelemetry.test.ts, code/core/src/shared/utils/ai-checklist-flags.test.ts, code/core/src/shared/utils/analyze-test-results.test.ts, code/lib/create-storybook/src/commands/DependencyInstallationCommand.test.ts, code/lib/create-storybook/src/commands/PreflightCheckCommand.test.ts, code/lib/create-storybook/src/commands/ProjectDetectionCommand.test.ts, code/lib/create-storybook/src/commands/UserPreferencesCommand.test.ts, code/lib/create-storybook/src/generators/REACT_NATIVE/index.test.ts, code/lib/create-storybook/src/initiate.test.ts, code/lib/create-storybook/src/services/FrameworkDetectionService.test.ts, code/lib/create-storybook/src/services/ProjectTypeService.test.ts, code/lib/create-storybook/src/services/TelemetryService.test.ts

How Playwright validated this
test('addon-docs Canvas ActionBar renders without runtime errors', async ({ page }, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') {
      consoleErrors.push(msg.text());
    }
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(`${baseURL}/?path=/docs/example-button--docs`);

    const recipe = new RecipePage(page, expect);
    await recipe.waitUntilLoaded();

    const errorDisplay = page.locator('#sb-errordisplay');
    await expect(errorDisplay).toBeHidden();

    const canvas = recipe.previewRoot().locator('.docs-story, [class*="docs-story"]').first();
    await expect(canvas).toBeAttached();
    await canvas.scrollIntoViewIfNeeded();
    await canvas.hover();

    const toolbar = canvas.getByRole('toolbar');
    await expect(toolbar).toBeVisible();
    const showCode = toolbar.getByRole('button', { name: /show code/i });
    await expect(showCode).toBeVisible();

    await canvas.screenshot({
      path: testInfo.outputPath('docs-canvas-actionbar.png'),
    });
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'application/json',
    });
    await testInfo.attach('consoleErrors', {
      body: JSON.stringify(consoleErrors),
      contentType: 'application/json',
    });
  }

  expect(filterPageErrors(pageErrors)).toEqual([]);
});

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-15T18-45-48.518Z/pr-29-sidebar-Tree-status--e94d4-der-after-Tree-tsx-refactor-chromium/test-failed-1.png

2026-05-15T18-45-48.518Z/pr-29-sidebar-Tree-status--e94d4-der-after-Tree-tsx-refactor-chromium/test-failed-1.png

@valentinpalkovic valentinpalkovic force-pushed the next branch 2 times, most recently from ad75ba9 to 099b6f7 Compare May 15, 2026 19:48
@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 15, 2026
github-actions Bot pushed a commit that referenced this pull request May 15, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Reason: Playwright assertion failed in: ? — TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('#storybook-preview-iframe').contentFrame().locator('#storybook-root:visible, #storybook-docs:visible').locator(':scope > *').first() at _util.ts:31 29 | await this.page.waitForURL((url) => url.search.includes('path')); 30 | const root = this.previewRoot(); > 31 | await root.locator(':s

PR-added unit tests: ✅ passed — 6712 passed, 0 failed across 2118 suite(s)

Files: code/addons/vitest/src/vitest-plugin/agent-telemetry-reporter.test.ts, code/core/src/common/js-package-manager/NPMProxy.test.ts, code/core/src/common/js-package-manager/PNPMProxy.test.ts, code/core/src/common/js-package-manager/Yarn1Proxy.test.ts, code/core/src/common/js-package-manager/Yarn2Proxy.test.ts, code/core/src/core-server/server-channel/ai-setup-channel.test.ts, code/core/src/core-server/server-channel/ghost-stories-channel.test.ts, code/core/src/core-server/utils/checklist.test.ts, code/core/src/core-server/utils/ghost-stories/parse-vitest-report.test.ts, code/core/src/core-server/withTelemetry.test.ts, code/core/src/shared/utils/ai-checklist-flags.test.ts, code/core/src/shared/utils/analyze-test-results.test.ts, code/lib/create-storybook/src/commands/DependencyInstallationCommand.test.ts, code/lib/create-storybook/src/commands/PreflightCheckCommand.test.ts, code/lib/create-storybook/src/commands/ProjectDetectionCommand.test.ts, code/lib/create-storybook/src/commands/UserPreferencesCommand.test.ts, code/lib/create-storybook/src/generators/REACT_NATIVE/index.test.ts, code/lib/create-storybook/src/initiate.test.ts, code/lib/create-storybook/src/services/FrameworkDetectionService.test.ts, code/lib/create-storybook/src/services/ProjectTypeService.test.ts, code/lib/create-storybook/src/services/TelemetryService.test.ts

How Playwright validated this
test('sidebar Tree renders with merged status button after status-icon refactor', async ({ page }, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') consoleErrors.push(msg.text());
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(
      `${baseURL}/?path=/story/sidebar-tree-status--with-new`,
    );

    const recipe = new RecipePage(page, expect);
    await recipe.waitUntilLoaded();

    await expect(page.locator('.sidebar-container')).toBeVisible();

    await expect(page.locator('#sb-errordisplay')).toBeHidden();

    const previewIframe = recipe.previewIframe();
    const statusButton = previewIframe.locator(
      '[data-testid="tree-change-status-button"], [data-testid="tree-status-button"]',
    );
    await expect(statusButton.first()).toBeVisible({ timeout: 15000 });

    await previewIframe.locator('body').screenshot({
      path: testInfo.outputPath('tree-with-status.png'),
    });
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'application/json',
    });
    await testInfo.attach('consoleErrors', {
      body: JSON.stringify(consoleErrors),
      contentType: 'application/json',
    });
  }

  expect(filterPageErrors(pageErrors)).toEqual([]);
});

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-15T20-56-00.787Z/pr-29-sidebar-tree-status--fab12-date-and-sweep-icon-renders-chromium/test-failed-1.png

2026-05-15T20-56-00.787Z/pr-29-sidebar-tree-status--fab12-date-and-sweep-icon-renders-chromium/test-failed-1.png

github-actions Bot pushed a commit that referenced this pull request May 18, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target react-vite/default-ts)

Reason: Playwright assertion failed in: ? — Error: expect(locator).toBeVisible() failed Locator: locator('#storybook-preview-iframe').contentFrame().locator('.docs-story, [class*="docs-story"]').first().getByRole('button', { name: /show code/i }) Expected: visible Timeout: 10000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 10000ms - waiting for locator('#storybook-preview-iframe').contentFrame().locator(

How Playwright validated this
test('ActionBar ActionButton forwards ariaLabel prop as aria-label', async ({ page }, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') consoleErrors.push(msg.text());
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(`${baseURL}/?path=/docs/example-button--docs`);

    const sb = new RecipePage(page, expect);
    await sb.waitUntilLoaded();

    const errorDisplay = page.locator('#sb-errordisplay');
    await expect(errorDisplay).toBeHidden();

    const previewIframe = sb.previewIframe();
    const previewRoot = sb.previewRoot();
    await expect(previewRoot).toBeVisible();

    const canvas = previewIframe
      .locator('.docs-story, [class*="docs-story"]')
      .first();
    await canvas.scrollIntoViewIfNeeded();
    await canvas.hover();

    const actionBar = canvas.locator('xpath=..').locator('button').filter({ hasText: /show code/i }).first();
    await expect(actionBar).toBeVisible({ timeout: 15000 });

    const ariaLabelValue = await actionBar.getAttribute('aria-label');
    expect(ariaLabelValue).toBeNull();

    const accessibleName = await actionBar.evaluate((el) => el.textContent?.trim() ?? '');
    expect(accessibleName.toLowerCase()).toContain('show code');

    await expect(actionBar).toBeEnabled();
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'application/json',
    });
    await testInfo.attach('consoleErrors', {
      body: JSON.stringify(consoleErrors),
      contentType: 'application/json',
    });
  }

  expect(filterPageErrors(pageErrors)).toEqual([]);
});

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-18T06-26-40.991Z/pr-29-ActionBar-action-but-01604-labels-ariaLabel-forwarded--chromium/test-failed-1.png

2026-05-18T06-26-40.991Z/pr-29-ActionBar-action-but-01604-labels-ariaLabel-forwarded--chromium/test-failed-1.png

@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 18, 2026
github-actions Bot pushed a commit that referenced this pull request May 18, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target react-vite/default-ts)

Reason: Playwright assertion failed in: ? — Error: expect(locator).toBeVisible() failed Locator: locator('#storybook-preview-iframe').contentFrame().locator('.docs-story, [class*="docs-story"]').first().getByRole('toolbar') Expected: visible Timeout: 10000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 10000ms - waiting for locator('#storybook-preview-iframe').contentFrame().locator('.docs-story, [class*="

How Playwright validated this
test('ActionBar ActionButton receives aria-label from ariaLabel prop', async ({
  page,
}, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') consoleErrors.push(msg.text());
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(`${baseURL}/?path=/docs/example-button--docs`);

    const recipe = new RecipePage(page, expect);
    await recipe.waitUntilLoaded();

    const errorDisplay = page.locator('#sb-errordisplay');
    await expect(errorDisplay).toBeHidden();

    const previewIframe = recipe.previewIframe();
    const previewRoot = recipe.previewRoot();
    await expect(previewRoot).toBeVisible();

    //
    const canvas = previewIframe.locator('.docs-story, [class*="docs-story"]').first();
    await canvas.scrollIntoViewIfNeeded();
    await canvas.hover();

    const showCodeButton = canvas
      .locator('button.docblock-code-toggle, button')
      .filter({ hasText: /show code/i })
      .first();
    await expect(showCodeButton).toBeVisible({ timeout: 15000 });

    await expect(showCodeButton).toBeEnabled();

    await showCodeButton.click();

    const codeBlock = previewIframe.locator('pre.prismjs').first();
    await expect(codeBlock).toBeVisible({ timeout: 10000 });
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'application/json',
    });
    await testInfo.attach('consoleErrors', {
      body: JSON.stringify(consoleErrors),
      contentType: 'application/json',
    });
  }

  expect(filterPageErrors(pageErrors)).toEqual([]);
});

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-18T06-42-42.065Z/pr-29-ActionBar-ActionItem-bd2ae-a-label-from-ariaLabel-prop-chromium/test-failed-1.png

2026-05-18T06-42-42.065Z/pr-29-ActionBar-ActionItem-bd2ae-a-label-from-ariaLabel-prop-chromium/test-failed-1.png

@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 18, 2026
github-actions Bot pushed a commit that referenced this pull request May 18, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target react-vite/default-ts)

Reason: Playwright assertion failed in: ? — Error: expect(locator).toBeVisible() failed Locator: locator('#storybook-preview-iframe').contentFrame().locator('#storybook-root:visible, #storybook-docs:visible').locator('.docs-story, [class*="docs-story"]').first().getByRole('toolbar') Expected: visible Timeout: 10000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 10000ms - waiting for locator('#storybook-pre

How Playwright validated this
test('Preview additionalActionItems forward ariaLabel to ActionBar buttons', async ({ page }, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') consoleErrors.push(msg.text());
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(`${baseURL}/?path=/docs/example-button--docs`);
    const sb = new RecipePage(page, expect);
    await sb.waitUntilLoaded();

    const errorDisplay = page.locator('#sb-errordisplay');
    await expect(errorDisplay).toBeHidden();

    const previewIframe = sb.previewIframe();
    const previewRoot = sb.previewRoot();
    await expect(previewRoot).toBeVisible();

    const canvas = previewIframe.locator('.docs-story, [class*="docs-story"]').first();
    await canvas.scrollIntoViewIfNeeded();
    await canvas.hover();

    //
    const showCode = canvas.getByRole('button', { name: /show code/i }).first();
    await expect(showCode).toBeVisible({ timeout: 15000 });

    await expect(showCode).toBeEnabled();

    await canvas.screenshot({
      path: testInfo.outputPath('canvas-actionbar.png'),
    });
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'application/json',
    });
    await testInfo.attach('consoleErrors', {
      body: JSON.stringify(consoleErrors),
      contentType: 'application/json',
    });
  }

  expect(filterPageErrors(pageErrors)).toEqual([]);
});

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-18T11-23-45.682Z/pr-29-ActionBar-action-buttons-expose-aria-label-attribute-chromium/test-failed-1.png

2026-05-18T11-23-45.682Z/pr-29-ActionBar-action-buttons-expose-aria-label-attribute-chromium/test-failed-1.png

valentinpalkovic added a commit that referenced this pull request May 18, 2026
…ActionBar scope

Wave findings (#28/#29/#31 stuck at regression despite passing PR unit tests —
recipe-author mis-targeted the DOM):

- ActionBar/Canvas rule was conflating the docs-Canvas Zoom/Show-code toolbar
  with the generic `ActionBar` component. Scope-tagged it to the docs-Canvas
  surface only.
- New HARD GATE "additive-only API changes with no story/consumer" — the #1
  false-regression cause. #28/#29 add `ActionItem.ariaLabel` but no story or
  in-diff consumer passes it, so the attribute is never in the DOM; asserting
  it always fails. Rule: detect additive-no-consumer, fall back to
  `@verify-mode: visual` smoke on the component's existing story
  (`components-actionbar--many-items`), never `getByRole('toolbar')` (the
  component renders plain <button>s) nor `.docs-story`.
- New HARD GATE for `Brand` / `theme.brand.title`: the sanitized
  dangerouslySetInnerHTML path runs ONLY when `theme.brand.image === null`.
  Target the existing `manager-sidebar-heading--only-text` /
  `--link-and-text` stories (already `{title, image:null}`); never runtime
  `api.setOptions({theme})` (#31 false regression — never reaches the path).
  XSS-inert proof is the PR's unit test; recipe is a render/boot smoke.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 18, 2026
github-actions Bot pushed a commit that referenced this pull request May 18, 2026
@github-actions github-actions Bot added the verified-by-harness Verified by PR Verify Harness label May 18, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: verified (target internal-ui)

How Playwright validated this
test('ActionBar stories render cleanly with new optional ariaLabel prop', async ({ page }, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') {
      consoleErrors.push(msg.text());
    }
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(`${baseURL}/?path=/story/components-actionbar--many-items`);

    const sb = new RecipePage(page, expect);
    await sb.waitUntilLoaded();

    const errorDisplay = page.locator('#sb-errordisplay');
    await expect(errorDisplay).toBeHidden();

    const previewIframe = page.frameLocator('#storybook-preview-iframe');
    const previewRoot = previewIframe.locator('#storybook-root, #root');
    await expect(previewRoot).toBeVisible();

    const buttons = previewRoot.locator('button');
    const count = await buttons.count();
    expect(count).toBeGreaterThanOrEqual(2);

    await page.goto(`${baseURL}/?path=/story/components-actionbar--single-item`);
    await sb.waitUntilLoaded();
    await expect(errorDisplay).toBeHidden();
    await expect(previewRoot).toBeVisible();
    const singleButtons = previewRoot.locator('button');
    expect(await singleButtons.count()).toBeGreaterThanOrEqual(1);
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'application/json',
    });
    await testInfo.attach('consoleErrors', {
      body: JSON.stringify(consoleErrors),
      contentType: 'application/json',
    });
  }

  expect(filterPageErrors(pageErrors)).toEqual([]);
});

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-18T11-58-53.454Z/pr-29-ActionBar-stories-re-b0e67-new-optional-ariaLabel-prop-chromium/test-finished-1.png

2026-05-18T11-58-53.454Z/pr-29-ActionBar-stories-re-b0e67-new-optional-ariaLabel-prop-chromium/test-finished-1.png

- Add ariaLabel?: string to ActionItem in ActionBar.tsx

- Sync the duplicate inline type in addons/docs/src/types.ts

- Pass ariaLabel through to Button in Preview.tsx (defaults to false to suppress the mandatory-prop warning when title is visible)

Closes storybookjs#34746
Addresses CodeRabbit review feedback. ActionBar.tsx now destructures ariaLabel and passes it as aria-label HTML attribute, so ActionItem.ariaLabel is honored when ActionBar is used directly (not only via Preview.tsx).
github-actions Bot pushed a commit that referenced this pull request May 19, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Reason: Playwright assertion failed in: ? — TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('#storybook-preview-iframe').contentFrame().locator('#storybook-root:has(> *), #storybook-docs:has(> *)').locator(':scope > *').first() at _util.ts:75 73 | await this.page.waitForURL((url) => url.search.includes('path')); 74 | const root = this.previewRoot(); > 75 | await root.locator('

How Playwright validated this
test('ActionBar renders cleanly after ariaLabel additive prop', async ({ page }, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') consoleErrors.push(msg.text());
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(`${baseURL}/?path=/story/components-actionbar--many-items`);
    const sb = new RecipePage(page, expect);
    await sb.waitUntilLoaded();

    const errorDisplay = page.locator('#sb-errordisplay');
    await expect(errorDisplay).toBeHidden();

    const previewIframe = sb.previewIframe();

    const changeView = previewIframe.getByRole('button', { name: 'Change view' });
    await expect(changeView).toBeVisible();
    await expect(changeView).not.toHaveAttribute('aria-label', /.+/);

    const useFoo = previewIframe.getByRole('button', { name: 'Use Foo' });
    await expect(useFoo).toBeVisible();
    await expect(useFoo).not.toHaveAttribute('aria-label', /.+/);

    const useBar = previewIframe.getByRole('button', { name: 'Use Bar' });
    await expect(useBar).toBeVisible();
    await expect(useBar).not.toHaveAttribute('aria-label', /.+/);
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'application/json',
    });
    await testInfo.attach('consoleErrors', {
      body: JSON.stringify(consoleErrors),
      contentType: 'application/json',
    });
  }

  expect(filterPageErrors(pageErrors)).toEqual([]);
  expect(filterConsoleErrors(consoleErrors)).toEqual([]);
});

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-19T13-59-50.815Z/pr-29-ActionBar-story-rend-08655-ter-ariaLabel-additive-prop-chromium/test-failed-1.png

2026-05-19T13-59-50.815Z/pr-29-ActionBar-story-rend-08655-ter-ariaLabel-additive-prop-chromium/test-failed-1.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:verify Trigger PR Verification Harness verified-by-harness Verified by PR Verify Harness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants