Skip to content

feat(forms): bound SearchPage query length with accessible feedback (#271)#425

Open
jd5073356-max wants to merge 1 commit into
Grainlify:mainfrom
jd5073356-max:forms/searchpage-maxlength
Open

feat(forms): bound SearchPage query length with accessible feedback (#271)#425
jd5073356-max wants to merge 1 commit into
Grainlify:mainfrom
jd5073356-max:forms/searchpage-maxlength

Conversation

@jd5073356-max

Copy link
Copy Markdown

Adds MAX_SEARCH_LENGTH=100 with maxLength, an aria-live="polite" counter (visible at >=80 chars), and whitespace trimming before dispatch while preserving the existing debounce.

Verification:

  • typecheck: OK
  • pnpm test -- SearchPage: 15/15 green
  • coverage: 100% lines of touched file
  • genuinity check: test fails without the change

Closes #271

…rainlify#271)

The dashboard search input had no length bound or feedback, so very long
pasted queries were silently debounced and sent to search.

- Add maxLength={100} to the search input.
- Show an aria-live character counter as the query approaches the limit,
  with a "Character limit reached" message at the cap.
- Trim leading/trailing whitespace before searching (debounce unchanged).
- Extend SearchPage tests: maxLength attribute, counter near/at the limit,
  trimmed query matching, and whitespace-only handling.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a maxLength bound and accessible counter to the dashboard SearchPage input

1 participant