Making a custom form element AJAX aware
It has no effect because Drupal doesn't know what event to fire on.

If you look at the switch statement in ajax_pre_render_element() you can see that it has default events for all core element types. But it it doesn't know about your element type, and no event is provided, so it doesn't know how to continue. It returns the element as-is rather than attempt to make a decision its not qualified to make.

To fix you should just be able to pick an appropriate event for the code to fire on, e.g.

$form['test_element'] = array(
  '#type' =&gt; 'customelement',
  '#title' =&gt; 'Custom element test',
  '#required' =&gt; TRUE,
  '#ajax' =&gt; array(
    'event' =&gt; 'click',
    ...
  ),
);