Additional Information about the buttons on Bootstrap was added (#26549)
added information about the usage of the 'role' attribute when using the btn classes on 'a' tags rather then using regular button elements.
This commit is contained in:
committed by
Christopher McCormack
parent
a6236d89ae
commit
713da19adc
@ -13,6 +13,8 @@ To use bootstrap buttons you follow the same steps that you would to create a bu
|
|||||||
`<button type="button" class="btn btn-primary">Primary</button>`
|
`<button type="button" class="btn btn-primary">Primary</button>`
|
||||||
|
|
||||||
You can also use bootstrap buttons with the `<a>` and `<input>` elements as shown in the examples below.
|
You can also use bootstrap buttons with the `<a>` and `<input>` elements as shown in the examples below.
|
||||||
|
As per the [Bootstrap](https://getbootstrap.com/docs/4.0/components/buttons/) documentation,
|
||||||
|
> When using button classes on <a> elements that are used to trigger in-page functionality (like collapsing content), rather than linking to new pages or sections within the current page, these links should be given a role="button" to appropriately convey their purpose to assistive technologies such as screen readers.
|
||||||
|
|
||||||
`<a class="btn btn-primary" href="#" role="button">This button is a link</a>`
|
`<a class="btn btn-primary" href="#" role="button">This button is a link</a>`
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user