title: Custom data attributes in WordPress widget links
body: <p>I'm building a mobile website with WordPress and jQuery Mobile.</p>
  
  <p>I would like to create a custom widget area appearing when the user taps on a button. </p>
  
  <p>I would like the links contained in the widget area look like JQM buttons. To do that I should add the attribute data-role="button" to the 'a' elements in the widget.</p>
  
  <p>Is there a way to add a custom attribute to these 'a' elements from functions.php?</p>
  
  <p>By default, this is the code of a link in a widget:</p>
  
  <pre><code>&lt;h3 class="widget-title"&gt;Categories&lt;/h3&gt;
    &lt;ul&gt;
      &lt;li class="cat-item cat-item-646"&gt;
        &lt;a title="Some title" href="http://example.com/category/"&gt;Category&lt;/a&gt;
      &lt;/li&gt;
      ... 
  </code></pre>
  
  <p>I need to add a data-role attribute inside 'a' element:</p>
  
  <pre><code>&lt;a title="Some title" href="http://example.com/category/" data-role="button"&gt;Category&lt;/a&gt;
  </code></pre>
  
  <p>I would like to know if WP API provides a filter to do that from functions.php, or if it is possible in some way with PHP</p>