Problem/Motivation

I'm currently working on an user extending module and wondered all the time, why the defined attributes are not rendered. But this actually also affects the in-core defined attributes for hook_user_view() elements. template_preprocess_user_profile_category() and template_preprocess_user_profile_item() look for $variables['element']['#attributes'] and save it as string at $variables['attributes'] for the template file. But in template file the variable is empty.

Proposed resolution

It looks like the variable 'attributes' is predefined since some Drupal (I do not know since when this happens), but using 'attribute' as array key seems to work, attributes are available with this in the template file.