It is valid. You can, for example, use it to show modals (or similar things that respond to data-toggle
and data-target
attributes).
Something like:
<a role="button" data-toggle="modal" data-target=".bs-example-modal-sm" aria-hidden="true"><i class="fa fa-phone"></i></a>
Here I use the font-awesome icon, which is better as a a
tag rather than a button
, to show a modal. Also, setting role="button"
makes the pointer change to an action type. Without either href
or role="button"
, the cursor pointer does not change.