fix(#248): address PR review concerns — i18n, aria-label, stable keys, test selectors
- Add filter_operator_and/or/and_label/or_label i18n keys to de/en/es locale files - Add aria-label and aria-pressed to AND/OR toggle buttons in SearchFilterBar - Add data-testid="operator-and/or" for unambiguous test targeting (fixes substring match on German "Schlagwort") - Use stable keys (tag.id ?? tag.name) for TagInput chip and suggestion lists - Remove aria-level from role="option" items in TagInput (invalid attribute for that role) - Add aria-live="polite" role="status" to TagMergeZone step indicator Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -119,7 +119,7 @@ function handleKeydown(e: KeyboardEvent) {
|
||||
class="flex min-h-[42px] flex-wrap gap-2 rounded border border-line bg-surface p-2 focus-within:border-ink focus-within:ring-1 focus-within:ring-ink"
|
||||
>
|
||||
<!-- Render Selected Tags -->
|
||||
{#each tags as tag, i (i)}
|
||||
{#each tags as tag, i (tag.id ?? tag.name)}
|
||||
<span class="flex items-center gap-1 rounded bg-muted px-2 py-1 text-sm font-medium text-ink">
|
||||
{#if tag.color}
|
||||
<span
|
||||
@@ -169,7 +169,7 @@ function handleKeydown(e: KeyboardEvent) {
|
||||
<ul
|
||||
class="absolute top-full left-0 z-50 mt-1 max-h-48 w-full overflow-y-auto rounded border border-line bg-surface shadow-lg"
|
||||
>
|
||||
{#each orderedSuggestions as suggestion, i (i)}
|
||||
{#each orderedSuggestions as suggestion, i (suggestion.id ?? suggestion.name)}
|
||||
<li
|
||||
role="option"
|
||||
aria-selected={i === activeIndex}
|
||||
|
||||
Reference in New Issue
Block a user