Closed trevorsaint closed 7 years ago
Thanks for raising this.
This was previously discussed at length in #272, so it's worth reading through that for the background.
I believe the consensus was that the button role is appropriate as long as users expectations (and the way it's announced to assistive tech) are met - i.e. you can activate it using space, which is covered by the shim that was introduced as a result of that discussion.
Going to close this out as per @36degrees referenced issue. Thanks for raising @trevorsaint 👍
Is the role attribute on an anchor tag correct usage of the role attribute?
Adding the role attribute to a span tag perhaps, but not an anchor tag.
Passing this through tenon.io comes back a fail.
How would you expect it to work?
I don't think it is required on anchor tags.
We could perhaps use a data attribute of button and target this with the javascript shim to make it act as a button rather than targetting the role attribute.
<a class="button button-start" href="/page-url" data-type="button">As an example</a>
There may be good reason for this that I am unaware of...