2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-11 18:02:28 +03:00

Use callout without custom Jekyll plugin.

This commit is contained in:
m5o
2018-01-16 00:49:36 +02:00
committed by XhmikosR
parent 7b2427cc6b
commit b5e6eb22a6
30 changed files with 110 additions and 118 deletions
+4 -4
View File
@@ -18,8 +18,7 @@ Bootstrap includes several predefined button styles, each serving its own semant
<button type="button" class="btn btn-link">Link</button>
{% endexample %}
{% capture callout-include %}{% include callout-warning-color-assistive-technologies.md %}{% endcapture %}
{{ callout-include | markdownify }}
{% include callout-warning-color-assistive-technologies.md %}
## Button tags
@@ -94,11 +93,12 @@ Disabled buttons using the `<a>` element behave a bit different:
<a href="#" class="btn btn-secondary btn-lg disabled" tabindex="-1" role="button" aria-disabled="true">Link</a>
{% endexample %}
{% callout warning %}
{% capture callout %}
##### Link functionality caveat
The `.disabled` class uses `pointer-events: none` to try to disable the link functionality of `<a>`s, but that CSS property is not yet standardized. In addition, even in browsers that do support `pointer-events: none`, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, add a `tabindex="-1"` attribute on these links (to prevent them from receiving keyboard focus) and use custom JavaScript to disable their functionality.
{% endcallout %}
{% endcapture %}
{% include callout.html content=callout type="warning" %}
## Button plugin