Skip to content
Preptima
hardConceptCodingScenarioMidSeniorStaff

Design rejected the native control, so you are building a custom one. How do you make it accessible?

An accessible custom interactive component should start from the nearest native element, preserve keyboard and focus behavior, and use ARIA only for state that HTML cannot express.

5 min readUpdated 2026-08-15

Answer

Short answer

Start with a native button, link, input or select whenever possible. If a custom control is unavoidable, implement the expected keyboard model, focus behavior, accessible name and state before adding ARIA.

Was this answer helpful?

Likely follow-ups

  • When is a roving tabindex the right choice and when would you use aria-activedescendant instead?
  • A designer wants the focus ring removed. What do you offer instead, and which success criterion are you protecting?
  • How would you test this without a screen reader, and what does that testing miss?
  • Your dropdown is a list of navigation links. Why is role=menu the wrong choice for it?

Related questions

Further reading