aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/site/docs/4.5/components/forms.md
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2020-08-22 19:40:57 +0200
committerMario Vavti <mario@mariovavti.com>2020-08-22 19:40:57 +0200
commita9e19cb89ed08689dc58c92b3d5491318a703f0e (patch)
tree468e236e5cb4927a4fd01f650fab7ad9f6cfc895 /vendor/twbs/bootstrap/site/docs/4.5/components/forms.md
parent48786119871aaf1029fac12a37d212afddafc757 (diff)
downloadvolse-hubzilla-a9e19cb89ed08689dc58c92b3d5491318a703f0e.tar.gz
volse-hubzilla-a9e19cb89ed08689dc58c92b3d5491318a703f0e.tar.bz2
volse-hubzilla-a9e19cb89ed08689dc58c92b3d5491318a703f0e.zip
composer update bootstrap
Diffstat (limited to 'vendor/twbs/bootstrap/site/docs/4.5/components/forms.md')
-rw-r--r--vendor/twbs/bootstrap/site/docs/4.5/components/forms.md26
1 files changed, 15 insertions, 11 deletions
diff --git a/vendor/twbs/bootstrap/site/docs/4.5/components/forms.md b/vendor/twbs/bootstrap/site/docs/4.5/components/forms.md
index 651046c27..4a8f62947 100644
--- a/vendor/twbs/bootstrap/site/docs/4.5/components/forms.md
+++ b/vendor/twbs/bootstrap/site/docs/4.5/components/forms.md
@@ -258,7 +258,7 @@ Group checkboxes or radios on the same horizontal row by adding `.form-check-inl
### Without labels
-Add `.position-static` to inputs within `.form-check` that don't have any label text. Remember to still provide some form of label for assistive technologies (for instance, using `aria-label`).
+Add `.position-static` to inputs within `.form-check` that don't have any label text. Remember to still provide some form of accessible name for assistive technologies (for instance, using `aria-label`).
{% capture example %}
<div class="form-check">
@@ -732,7 +732,9 @@ Add the `disabled` attribute to a `<fieldset>` to disable all the controls withi
{% capture callout %}
##### Caveat with anchors
-By default, browsers will treat all native form controls (`<input>`, `<select>` and `<button>` elements) inside a `<fieldset disabled>` as disabled, preventing both keyboard and mouse interactions on them. However, if your form also includes `<a ... class="btn btn-*">` elements, these will only be given a style of `pointer-events: none`. As noted in the section about [disabled state for buttons]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/buttons/#disabled-state) (and specifically in the sub-section for anchor elements), this CSS property is not yet standardized and isn't fully supported in Internet Explorer 10, and won't prevent keyboard users from being able to focus or activate these links. So to be safe, use custom JavaScript to disable such links.
+Browsers treat all native form controls (`<input>`, `<select>`, and `<button>` elements) inside a `<fieldset disabled>` as disabled, preventing both keyboard and mouse interactions on them.
+
+However, if your form also includes custom button-like elements such as `<a ... class="btn btn-*">`, these will only be given a style of `pointer-events: none`. As noted in the section about [disabled state for buttons]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/buttons/#disabled-state) (and specifically in the sub-section for anchor elements), this CSS property is not yet standardized and isn't fully supported in Internet Explorer 10. The anchor-based controls will also still be focusable and operable using the keyboard. You must manually modify these controls by adding `tabindex="-1"` to prevent them from receiving focus and `aria-disabled="disabled"` to signal their state to assistive technologies.
{% endcapture %}
{% include callout.html content=callout type="warning" %}
@@ -748,7 +750,7 @@ While Bootstrap will apply these styles in all browsers, Internet Explorer 11 an
Provide valuable, actionable feedback to your users with HTML5 form validation–[available in all our supported browsers](https://caniuse.com/#feat=form-validation). Choose from the browser default validation feedback, or implement custom messages with our built-in classes and starter JavaScript.
{% capture callout %}
-We currently recommend using custom validation styles, as native browser default validation messages are not consistently exposed to assistive technologies in all browsers (most notably, Chrome on desktop and mobile).
+We are aware that currently the client-side custom validation styles and tooltips are not accessible, since they are not exposed to assistive technologies. While we work on a solution, we'd recommend either using the server-side option or the default browser validation method.
{% endcapture %}
{% include callout.html content=callout type="warning" %}
@@ -912,6 +914,8 @@ While these feedback styles cannot be styled with CSS, you can still customize t
We recommend using client-side validation, but in case you require server-side validation, you can indicate invalid and valid form fields with `.is-invalid` and `.is-valid`. Note that `.invalid-feedback` is also supported with these classes.
+For invalid fields, ensure that the invalid feedback/error message is associated with the relevant form field using `aria-describedby`. This attribute allows more than one `id` to be referenced, in case the field already points to additional form text.
+
{% capture example %}
<form>
<div class="form-row">
@@ -933,36 +937,36 @@ We recommend using client-side validation, but in case you require server-side v
<div class="form-row">
<div class="col-md-6 mb-3">
<label for="validationServer03">City</label>
- <input type="text" class="form-control is-invalid" id="validationServer03" required>
- <div class="invalid-feedback">
+ <input type="text" class="form-control is-invalid" id="validationServer03" aria-describedby="validationServer03Feedback" required>
+ <div id="validationServer03Feedback" class="invalid-feedback">
Please provide a valid city.
</div>
</div>
<div class="col-md-3 mb-3">
<label for="validationServer04">State</label>
- <select class="custom-select is-invalid" id="validationServer04" required>
+ <select class="custom-select is-invalid" id="validationServer04" aria-describedby="validationServer04Feedback" required>
<option selected disabled value="">Choose...</option>
<option>...</option>
</select>
- <div class="invalid-feedback">
+ <div id="validationServer04Feedback" class="invalid-feedback">
Please select a valid state.
</div>
</div>
<div class="col-md-3 mb-3">
<label for="validationServer05">Zip</label>
- <input type="text" class="form-control is-invalid" id="validationServer05" required>
- <div class="invalid-feedback">
+ <input type="text" class="form-control is-invalid" id="validationServer05" aria-describedby="validationServer05Feedback" required>
+ <div id="validationServer05Feedback" class="invalid-feedback">
Please provide a valid zip.
</div>
</div>
</div>
<div class="form-group">
<div class="form-check">
- <input class="form-check-input is-invalid" type="checkbox" value="" id="invalidCheck3" required>
+ <input class="form-check-input is-invalid" type="checkbox" value="" id="invalidCheck3" aria-describedby="invalidCheck3Feedback" required>
<label class="form-check-label" for="invalidCheck3">
Agree to terms and conditions
</label>
- <div class="invalid-feedback">
+ <div id="invalidCheck3Feedback" class="invalid-feedback">
You must agree before submitting.
</div>
</div>