Unable to set placeholder on password input
Wish I'd seen this sooner. You've probably moved on from this problem, but for the benefit of other people seeking an answer to this question: (obviously replace mymodule with the name of your module)

/**
* Implementation of hook_element_info_alter ()
*/
function mymodule_element_info_alter (&amp; $type)
{
  if (isset($type['password_confirm']['#process'])) {
    $func = '_mymodule_process_password_confirm';

    $type['password_confirm']['#process'][] = $func;
  }

  return $type;
}

/**
 * Do a bit of processing for the password_confirm element.
 * Original processing happens in expand_password_confirm()
 */
function _mymodule_process_password_confirm ($element)
{
  // Use the element's title, or create a custom title with the t() function.
  $element['pass1']['#attributes']['placeholder'] = $element['pass1']['#title'];
  $element['pass2']['#attributes']['placeholder'] = $element['pass2']['#title'];

  // Remove these lines if you want to keep the field labels.
  $element['pass1']['#title_display'] = 'none';
  $element['pass2']['#title_display'] = 'none';

  return $element;
}