added classes and parameters to elements

Is there a way to stop web core adding (or overwriting) the class and other things in elements when we are using templates?

For example the template has:

<button class="btn btn-primary" id="CancelButton" type="button">CancelButton</button>

The output in the app is

<button class="btn" id="CancelButton" type="BUTTON" tabindex="1" role="button" aria-label="Cancel" style="">Cancel</button>

where the class is overwritten

It would be useful to be able to turn off the tabindex globally and let the layout take care of it.

Thanks