feat(transcription): decouple @mention display text from person search (#380) #629

Merged
marcel merged 41 commits from feat/issue-380-decouple-mention-search into main 2026-05-20 20:36:39 +02:00
2 changed files with 14 additions and 1 deletions
Showing only changes of commit 344f5cac77 - Show all commits

View File

@@ -188,7 +188,7 @@ function selectItem(item: Person) {
<a <a
href="/persons/new" href="/persons/new"
target="_blank" target="_blank"
rel="noopener" rel="noopener noreferrer"
class="flex min-h-[44px] items-center gap-2 border-t border-line px-3 py-2.5 font-sans text-sm font-medium text-brand-navy hover:bg-canvas focus:bg-canvas focus:outline-none" class="flex min-h-[44px] items-center gap-2 border-t border-line px-3 py-2.5 font-sans text-sm font-medium text-brand-navy hover:bg-canvas focus:bg-canvas focus:outline-none"
onmousedown={(e) => e.preventDefault()} onmousedown={(e) => e.preventDefault()}
> >

View File

@@ -77,6 +77,19 @@ describe('MentionDropdown — search input', () => {
await expect.element(page.getByText(m.person_mention_search_prompt())).not.toBeInTheDocument(); await expect.element(page.getByText(m.person_mention_search_prompt())).not.toBeInTheDocument();
}); });
it('"create new person" link has rel="noopener noreferrer" (CWE-116)', async () => {
render(MentionDropdown, {
model: makeModel([]),
editorQuery: 'unknown', // non-empty so the empty-state link renders
onSearch: () => {}
});
const link = document.querySelector('a[href="/persons/new"]') as HTMLAnchorElement;
expect(link).not.toBeNull();
expect(link.getAttribute('rel')).toContain('noopener');
expect(link.getAttribute('rel')).toContain('noreferrer');
});
it('search input wrapper meets the 44px touch target (WCAG 2.2 AA)', async () => { it('search input wrapper meets the 44px touch target (WCAG 2.2 AA)', async () => {
render(MentionDropdown, { render(MentionDropdown, {
model: makeModel(), model: makeModel(),