1
1
mirror of https://github.com/primer/css.git synced 2024-12-23 06:01:54 +03:00

Remove note and example about role (#2098)

* Remove note and example about role

Removing the text about role and example. If you're using `<button>` from HTML semantics, no role is needed. If you're using an `<a>` element, it should not be overridden with `role=button`, it needs to stay as a link if it is truly a link.

* Add back in the note to add button type
This commit is contained in:
Chelsea Adelman 2022-05-31 11:46:31 -07:00 committed by GitHub
parent ab078a58c6
commit 03ccbf9e7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,11 +12,10 @@ Buttons are used for **actions**, like in forms, while textual hyperlinks are us
<button class="btn" type="button">Button</button>
```
Note: When using a `<button>` element, **always specify a `type`**. When using a `<a>` element, **always add `role="button"` for accessibility**.
Note: When using a `<button>` element, **always specify a `type`**.
```html live
<button class="btn mr-2" type="button">Button button</button>
<a class="btn" href="#url" role="button">Link button</a>
```
## Button types