diff --git a/packages/recorder/src/recorder.tsx b/packages/recorder/src/recorder.tsx index 2e05b65f6e..84265d845d 100644 --- a/packages/recorder/src/recorder.tsx +++ b/packages/recorder/src/recorder.tsx @@ -165,6 +165,7 @@ export const Recorder: React.FC = ({ sidebarSize={200} main={} sidebar={ copy((selectedTab === 'locator' ? locator : ariaSnapshot) || '')} />] : []} tabs={[ { diff --git a/packages/trace-viewer/src/ui/attachmentsTab.tsx b/packages/trace-viewer/src/ui/attachmentsTab.tsx index 93aa7951fa..7003cc717f 100644 --- a/packages/trace-viewer/src/ui/attachmentsTab.tsx +++ b/packages/trace-viewer/src/ui/attachmentsTab.tsx @@ -63,7 +63,7 @@ const ExpandableAttachment: React.FunctionComponent = return Math.min(Math.max(5, lineCount), 20) * lineHeight; }, [attachmentText]); - const title = + const title = {linkifyText(attachment.name)} {hasContent && download} ; diff --git a/packages/trace-viewer/src/ui/recorder/recorderView.tsx b/packages/trace-viewer/src/ui/recorder/recorderView.tsx index 6ff6b665d3..9b9b9abb19 100644 --- a/packages/trace-viewer/src/ui/recorder/recorderView.tsx +++ b/packages/trace-viewer/src/ui/recorder/recorderView.tsx @@ -151,7 +151,7 @@ export const Workbench: React.FunctionComponent = () => { toggleTheme()}> ; - const sidebarTabbedPane = ; + const sidebarTabbedPane = ; const traceView = } sidebar={ } sidebar={ void, dataTestId?: string, mode?: 'default' | 'select', -}> = ({ tabs, selectedTab, setSelectedTab, leftToolbar, rightToolbar, dataTestId, mode }) => { + id: string, +}> = ({ tabs, selectedTab, setSelectedTab, leftToolbar, rightToolbar, dataTestId, mode, id }) => { if (!selectedTab) selectedTab = tabs[0].id; if (!mode) @@ -52,6 +53,7 @@ export const TabbedPane: React.FunctionComponent<{ {tab.title}{suffix}; + return ; })} } @@ -82,9 +84,9 @@ export const TabbedPane: React.FunctionComponent<{ tabs.map(tab => { const className = 'tab-content tab-' + tab.id; if (tab.component) - return
{tab.component}
; + return
{tab.component}
; if (selectedTab === tab.id) - return
{tab.render!()}
; + return
{tab.render!()}
; }) } @@ -97,14 +99,14 @@ export const TabbedPaneTab: React.FunctionComponent<{ count?: number, errorCount?: number, selected?: boolean, - onSelect?: (id: string) => void -}> = ({ id, title, count, errorCount, selected, onSelect }) => { + onSelect?: (id: string) => void, + 'aria-controls'?: string, +}> = ({ id, title, count, errorCount, selected, onSelect, 'aria-controls': ariaControls }) => { return
onSelect?.(id)} role='tab' - aria-controls={`tab-${id}`} - title={title} - key={id}> + aria-controls={ariaControls} + aria-label={title}>
{title}
{!!count &&
{count}
} {!!errorCount &&
{errorCount}
} diff --git a/tests/playwright-test/ui-mode-test-attachments.spec.ts b/tests/playwright-test/ui-mode-test-attachments.spec.ts index 8f1d3d2e42..bdaca2d9a8 100644 --- a/tests/playwright-test/ui-mode-test-attachments.spec.ts +++ b/tests/playwright-test/ui-mode-test-attachments.spec.ts @@ -166,7 +166,7 @@ test('should link from attachment step to attachments view', async ({ runUITest, await page.getByRole('tab', { name: 'Attachments' }).click(); const panel = page.getByRole('tabpanel', { name: 'Attachments' }); - const attachment = panel.getByTitle('my-attachment'); + const attachment = panel.getByLabel('my-attachment'); await expect(attachment).not.toBeInViewport(); await page.getByText('attach "my-attachment"').click(); await expect(attachment).toBeInViewport();