TL;DR
Test a tagsinput as an interaction contract, not just a row of chips. Define what commits a value, how focus moves, which entries fail validation, and what reaches the server. Use unit tests for value rules, component tests for public behavior, browser tests for editing and submission, and manual screen-reader checks for meaningful feedback.
A tags input lets someone build a collection of values inside one field. The difficult release question is not whether the tags appear. It is whether someone can add, review, correct, and submit them without losing data or their place in the form.
We will verify an existing Vue component rather than rebuild it. If you still need the implementation, start with our Vue tags-input construction guide, then use the acceptance checks below against your finished field.
Table of contents
- Before you start
- 1. Write the tagsinput acceptance contract
- 2. Run a keyboard-only interaction matrix
- 3. Verify names, focus, errors, and announcements
- 4. Automate each expectation at the right layer
- 5. Challenge validation and input boundaries
- 6. Inspect submission and recovery at the form boundary
- 7. Gate the release on repeatable evidence
- Sources
- Recommended Reads
Before you start
Prepare:
- A local or authorized staging page using the component version, theme, and form configuration you intend to ship.
- Synthetic tag data, a visible field label, a submit button, and a way to inspect the parent value and outgoing request.
- Your existing unit/component runner, browser automation where available, and browser developer tools.
- A keyboard and a screen reader/browser combination from your support matrix.
Keep the real field wrapper and validation messages in the fixture. Testing a bare input will not verify how the integrated field presents errors. Do not use customer recipients or confidential labels in recordings.
1. Write the tagsinput acceptance contract
I start with expected outcomes before choosing assertions. Otherwise, a failed test can mean either broken behavior or an undecided product rule.
Use this illustrative contract for the examples:
- The field is called Topics, starts with
researchandlegal, and accepts at most three tags. - Enter commits a valid draft without submitting the surrounding form.
- Tab moves focus without committing; an unfinished nonempty draft blocks submission with an explanation.
- Surrounding whitespace is trimmed.
Researchis a duplicate ofresearch. - Commas and newlines separate pasted entries. Accepted entries are added in order; rejected entries are identified in feedback for recovery.
- Backspace in an empty draft first focuses the last tag. A second Backspace removes that focused tag.
- Removing a focused tag moves focus to the next tag, or to the text input when no next tag remains.
These are example product decisions, not universal tagsinput requirements. Adapt them to your component before using them as release criteria. Also document whether values are free-form labels or approved records, and whether tags support direct editing.
For a real interface to inspect, our tag-combobox playground presents selected tokens beside an editable properties panel, with documentation for known-option and custom-entry modes. Its configuration is separate from this guide’s illustrative fixture.

Checkpoint: two reviewers should predict the same result for each action. If they disagree about blur, duplicates, or pending text, settle the contract before labeling the difference a defect.
2. Run a keyboard-only interaction matrix
Reset to research and legal before each row. Keep the pointer out of the flow and record both the selected values and the focused element.
| Interaction | Action | Expected result under our example contract |
|---|---|---|
| Add | Type design, then press Enter |
Three tags appear; the draft clears; focus stays in the input; no form request occurs. |
| Edit draft | Type re, then press Backspace |
The draft becomes r; neither existing tag changes. |
| Reach a tag | Press Backspace with an empty draft | legal receives focus; both tags remain. |
| Remove | Press Backspace again on focused legal |
Only research remains; focus returns to the input. |
| Remove another tag | Focus the removal control for research and activate it |
legal remains and receives focus. |
| Leave and return | Tab onward, then Shift+Tab back | Focus follows the documented form order; the field remains operable. |
| Pending text | Type design, then Tab away |
The draft remains uncommitted; no third tag is silently added. |
Add a navigation row for your actual design. If tokens use Left and Right Arrow navigation, verify movement in both directions and the boundary back to the input. If removal buttons are ordinary Tab stops, verify their order instead. Do not require both models merely to satisfy a generic checklist.
For editable tags, test entering edit mode, saving a changed value, and canceling without changing it. If direct editing is not offered, verify that removing and re-adding one tag preserves every other value.
Suggestions add another keyboard context. Follow the W3C combobox pattern for the editable suggestion control: check option navigation, explicit acceptance, Escape dismissal, and ordinary text editing. Do not apply popup behavior to a field that has no popup.
When a row fails: capture the starting values, draft, key, resulting values, and focus destination. “Backspace is broken” is much less useful than a reproducible transition.
3. Verify names, focus, errors, and announcements
Now repeat a short journey with a screen reader: enter the field, add a tag, review the collection, remove one, trigger a duplicate error, and correct it.
Check meaning and timing rather than insisting on an identical spoken transcript across different screen readers.
Confirm the field remains understandable
The input’s accessible name should identify its purpose, such as “Topics.” Its instructions should explain the commit gesture. Removal actions need distinguishable names, such as “Remove research,” rather than several unexplained “Remove” buttons.
After each action, confirm that focus is visible and still useful. Remove the final tag, remove a middle tag, and trigger an error while a tag is focused. The next key must reach an appropriate control rather than a detached or unexpected element.
For a listbox-popup combobox using aria-activedescendant, inspect whether the referenced active option exists while navigating suggestions. Confirm that expanded state matches actual popup visibility and that dismissal leaves ordinary editing available. The APG combobox guidance addresses that suggestion interaction, not the entire multi-value collection.
Listen for useful feedback
Where the interface displays status messages, such as an added-tag confirmation or a result count, verify that equivalent information is available without moving focus. W3C’s status-message guidance distinguishes these messages from changes already conveyed through a control’s state. It also warns against excessively chatty feedback.
Trigger a duplicate and a limit error. Check that the message identifies the problem, explains the correction, and is programmatically associated with the field. Then correct the entry and verify that obsolete feedback no longer describes the field. These checks follow W3C’s form-notification guidance.
For a refresher on screen-reader navigation, Chrome for Developers’ NVDA tutorial is a useful companion. Use it for the basics, then run this journey in your own supported environment.
Checkpoint: someone who cannot see the chips should still understand what changed and how to recover from an error.
4. Automate each expectation at the right layer
We do not need a full application journey for every duplicate spelling. Allocate tests according to what they must observe. Vue’s testing guide distinguishes unit, component, and end-to-end coverage and recommends testing component public interfaces instead of private methods.
- Unit tests: cover deterministic rules such as comparison, parsing, limits, and rejected-value reporting. Use exact inputs and outputs.
- Component tests: render the real field with a small parent host. Verify that incoming values render, user actions update the bound parent value, and validation feedback appears in the intended place.
- Browser interaction tests: verify keyboard transitions, focus, native editing, and the submission boundary. A browser-based component test can cover focused interactions without exercising the entire backend.
- End-to-end tests: cover a small number of complete save and recovery journeys through your application and test backend.
Keep manual assistive-technology checks alongside these automated layers, rather than treating them as another assertion about DOM structure.

For a concrete component regression, initialize research and legal, remove legal through the public control, and assert that the parent contains only research. Then replace the parent value externally and confirm that the displayed collection follows it. This checks both directions without reaching into private tag state.
For browser automation, prefer labels, roles, and accessible names over generated classes or deep element paths. Wait for observable outcomes rather than adding arbitrary delays. Playwright’s best practices recommend user-visible behavior, resilient locators, and isolated tests.
Do not let one huge test depend on every previous interaction succeeding. Reset the fixture and control suggestion responses so a failure identifies one behavior.
Troubleshooting: if changing a wrapper element breaks tests without changing behavior, review the selectors. If simulated interactions pass but focus fails in a browser, retain a browser regression instead of weakening the expectation.
5. Challenge validation and input boundaries
Use a compact set of deliberate counterexamples, not random strings with unclear expected results.
Duplicates across entry paths. Attempt Research by typing, then by paste, then through a suggestion if that route exists. Under our example policy, the selected collection must not gain another research. Verify feedback as well as the final count.
Mixed paste. Start with only research. Paste design, Research followed by a newline and legal. Our expected selected array is ["research", "design", "legal"], with the duplicate identified. Exercise a native paste path as well as parser tests; replacing a value programmatically is not evidence that clipboard handling works.
Limits and empty entries. Test one below the tag limit, exactly at it, and an attempted fourth value. Try empty input, spaces, and consecutive delimiters. No blank chips should appear under this contract. If you also limit tag length, test the boundary separately from collection size and specify how length is counted.
Rejected content. For partial paste acceptance, verify exactly which values remain selected and which are reported as rejected. If your product instead rejects the entire paste, test that alternative explicitly. Do not allow silent loss to masquerade as successful entry.
Add targeted checks for your supported environment:
- Complete composition with an IME and confirm it does not unexpectedly commit a tag as well.
- Use a mobile keyboard’s action key and verify the chosen commit behavior.
- Attempt add, remove, and edit actions in disabled and read-only states.
- For remote suggestions, return an earlier query after a later one. Verify that stale results do not replace current results or erase selections.
Checkpoint: entry route, input method, or response order must not bypass the product’s chosen rules. If clipboard automation is unavailable, record a manual native-paste check rather than claiming automated coverage.
6. Inspect submission and recovery at the form boundary
A correct chip collection does not establish that the serializer submitted it correctly. Inspect the actual request, not only the component’s displayed value.
Run this save journey:
- Load
researchandlegalfrom the parent. - Remove
legalusing the keyboard. - Add
designwith Enter and confirm that this action alone makes no save request. - Activate the form’s submit button.
- Verify that the request contains exactly the contracted values, for example
["research", "design"]for a JSON string-array contract.
If your transport uses repeated form fields, inspect the complete collection at the receiving boundary. If tags represent records, verify their approved identifiers rather than assuming display labels are sufficient.
Next, leave an unfinished draft and submit. Under our example contract, submission must stop and explain how to add or remove that draft. Test your actual policy if it differs.
Exercise server rejection too. W3C’s input-validation guidance explains why client validation must be backed by server validation. In a controlled test environment, send a malformed request independently of the field and verify that the server rejects it.
For the UI recovery path, return a field error from the server, preserve the selected values for correction, correct the problem, and retry. Confirm that both the accepted request and the displayed feedback describe the corrected collection. Use the same notification checks from Step 3.
Finally, test reset and record switching. Clearing the form must not resurrect old tags on the next edit, and opening another record must not mix its values with the previous collection.
7. Gate the release on repeatable evidence
Keep a short release record with the component version, configuration, browser/OS, assistive technology where used, test date, and any unresolved failure.
Before shipping, confirm:
- The keyboard matrix passes, including removal and a predictable exit from the field.
- Labels, errors, focus, and meaningful announcements have been checked manually.
- Paste, duplicates, empty values, limits, and applicable input methods have explicit outcomes.
- Parent updates, submitted values, server rejection, and retry have regression coverage.
- Automated accessibility checks cover relevant states, including open suggestions and errors.
A clean automated scan is not an accessibility certificate. Playwright’s accessibility-testing guidance explicitly recommends combining automation with manual assessment and inclusive user testing.
You now have a release contract that can survive a markup refactor. Take the first failing transition, reproduce it in the smallest suitable test, and fix that boundary. To inspect the field in context, open the DOM Studio tag-combobox playground, then repeat the same journey in your application before approving the release.
Sources
- DOM Studio: Vue Tags Input construction guide
- DOM Studio: Vue Multi-Select and Tag Input
- W3C WAI: Combobox Pattern
- W3C WAI: Understanding Status Messages
- W3C WAI: User Notification
- W3C WAI: Validating Input
- Vue: Testing
- Playwright: Best Practices
- Playwright: Accessibility testing
- Chrome for Developers: Screen Reader Basics: NVDA
