Adding accept attribute to managed_file field to specify file types client-side
Still not sure if this is a bona fide bug; the file_managed element has several elements inside it, so there's no real way to specify which of those you're targeting with the #attributes property. 

So in one respect it does make sense that they'd be ignored, because of the ambiguity. But it works for classes, so it makes less sense. Would need a bit more digging to find out why I suspect.

Either way, you can work around it by adding your own process callback to the element:

$form['image_upload'] = array(
  '#type' =&gt; 'managed_file',
  '#title' =&gt; t('Image upload'),
  '#description' =&gt; t('Upload png images'),
  '#upload_location' =&gt; 'public://',
  '#process' =&gt; array('file_managed_file_process', 'MYMODULE_file_managed_file_process'),
);

function MYMODULE_file_managed_file_process($element) {
  $element['upload']['#attributes']['accept'] = '.jpg';
  return $element;
}