How to theme a link in a D7 render array?
The theme_link() function behaves a bit like the l() function; the attributes array needs to be inside an #options property:

$link = array(
  '#theme' =&gt; 'link',
  '#text' =&gt; $row-&gt;title,
  '#path' =&gt; $base_path . 'node/' . $row-&gt;nid,
  '#options' =&gt; array('attributes' =&gt; array('title' =&gt; $row-&gt;title)),
  '#prefix' =&gt; '&lt;h3&gt;',
  '#suffix' =&gt; '&lt;/h3&gt;'
);

echo render($link);