Define exactly what each button copies

Imagine a Budapest bicycle repair shop copying a work-order reference into a spare-parts supplier enquiry. For the test reference 001274, Copy reference should produce exactly those six characters. It should not add the visible label, a hidden link or trailing spaces that the destination may reject.

Place the button beside the full reference and identify its purpose in the label. If staff also need a supplier-facing summary, give that a separate Copy enquiry summary action with a visible preview. Specify its fields and exclude internal notes and unrelated customer details. An ambiguous Copy icon should not silently choose a larger payload.

Choose a small, maintainable text contract

Copying one reference is easy to inspect but still leaves staff to compose the enquiry. A prepared summary reduces repeated typing, while adding decisions about labels, field order, language, line breaks and missing values. Prefer plain text when the destination expects text; richer formatting adds receiving-app differences to test.

Decide whether copying uses the displayed saved values or an explicitly previewed draft. If a job changes, keep the preview and copied content consistent. Do not quietly mix an older visible reference with newer details. Changing the interface language may translate summary labels, but must not rewrite identifiers or customer-entered text.

Report only the completed clipboard step

MDN documents that writeText completes after the clipboard has been updated, and can fail when writing is not allowed. Show Reference copied only after that success. A button press or a changed icon alone is insufficient evidence.

W3C explains how status updates can reach assistive technology without taking focus. Use concise feedback identifying what was copied, rather than a generic Done. Copying does not prove that staff pasted into the supplier form or submitted an enquiry. Keep the repair job and enquiry status unchanged until their own workflow confirms the relevant action.

Keep a usable route when copying fails

The browser Clipboard API requires a secure context, and browser permission and interaction requirements differ. Trigger copying from a deliberate staff action on the HTTPS site and test the supported browsers. Do not automatically overwrite the clipboard when a record opens, refreshes or changes.

If the write fails or is unavailable, explain that copying did not complete and leave the exact text selectable for manual copying. Do not show success for the fallback until there is evidence for it. Staff should inspect the destination before submitting: a failed attempt may leave older clipboard content available to paste. Avoid reading unrelated clipboard contents merely to check a Copy button.

Approve the pasted result, not just the button

Use test records without real customer details and paste into the actual destination fields or an approved test equivalent. Record these acceptance checks:

  • Copy 001274 and confirm that both leading zeros remain, without extra labels or spaces.
  • Check accented text, empty fields and line breaks in every supported summary language.
  • Copy from one job, open another and confirm each button uses the intended record.
  • Compare saved values, previewed drafts and copied text after an edit.
  • Try keyboard use, screen-reader feedback, blocked access and manual selection on a phone.
  • Copy one value successfully, make the next copy fail, and ensure nobody mistakes the old value for the new one.

Sources and further reading

← Back to Insights