0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-10 22:24:19 +01:00

Fix/add more correct labels/descriptions for input group examples (#26551)

Among other things, closes https://github.com/twbs/bootstrap/issues/26548
This commit is contained in:
Patrick H. Lauke 2018-05-22 10:52:22 +01:00 committed by GitHub
parent b36599cba7
commit bea6154108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,21 +63,21 @@ Add the relative form sizing classes to the `.input-group` itself and contents w
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-sm">Small</span> <span class="input-group-text" id="inputGroup-sizing-sm">Small</span>
</div> </div>
<input type="text" class="form-control" aria-label="Small" aria-describedby="inputGroup-sizing-sm"> <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm">
</div> </div>
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-default">Default</span> <span class="input-group-text" id="inputGroup-sizing-default">Default</span>
</div> </div>
<input type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default"> <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
</div> </div>
<div class="input-group input-group-lg"> <div class="input-group input-group-lg">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-lg">Large</span> <span class="input-group-text" id="inputGroup-sizing-lg">Large</span>
</div> </div>
<input type="text" class="form-control" aria-label="Large" aria-describedby="inputGroup-sizing-sm"> <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-lg">
</div> </div>
{% endcapture %} {% endcapture %}
{% include example.html content=example %} {% include example.html content=example %}
@ -114,10 +114,10 @@ While multiple `<input>`s are supported visually, validation styles are only ava
{% capture example %} {% capture example %}
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text" id="">First and last name</span> <span class="input-group-text">First and last name</span>
</div> </div>
<input type="text" class="form-control"> <input type="text" aria-label="First name" class="form-control">
<input type="text" class="form-control"> <input type="text" aria-label="Last name" class="form-control">
</div> </div>
{% endcapture %} {% endcapture %}
{% include example.html content=example %} {% include example.html content=example %}
@ -132,11 +132,11 @@ Multiple add-ons are supported and can be mixed with checkbox and radio input ve
<span class="input-group-text">$</span> <span class="input-group-text">$</span>
<span class="input-group-text">0.00</span> <span class="input-group-text">0.00</span>
</div> </div>
<input type="text" class="form-control" aria-label="Amount (to the nearest dollar)"> <input type="text" class="form-control" aria-label="Dollar amount (with dot and two decimal places)">
</div> </div>
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" aria-label="Amount (to the nearest dollar)"> <input type="text" class="form-control" aria-label="Dollar amount (with dot and two decimal places)">
<div class="input-group-append"> <div class="input-group-append">
<span class="input-group-text">$</span> <span class="input-group-text">$</span>
<span class="input-group-text">0.00</span> <span class="input-group-text">0.00</span>
@ -150,29 +150,29 @@ Multiple add-ons are supported and can be mixed with checkbox and radio input ve
{% capture example %} {% capture example %}
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-prepend">
<button class="btn btn-outline-secondary" type="button">Button</button> <button class="btn btn-outline-secondary" type="button" id="button-addon1">Button</button>
</div> </div>
<input type="text" class="form-control" placeholder="" aria-label="" aria-describedby="basic-addon1"> <input type="text" class="form-control" placeholder="" aria-label="Example text with button addon" aria-describedby="button-addon1">
</div> </div>
<div class="input-group mb-3"> <div class="input-group mb-3">
<input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="basic-addon2"> <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="button-addon2">
<div class="input-group-append"> <div class="input-group-append">
<button class="btn btn-outline-secondary" type="button">Button</button> <button class="btn btn-outline-secondary" type="button" id="button-addon2">Button</button>
</div> </div>
</div> </div>
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-prepend" id="button-addon3">
<button class="btn btn-outline-secondary" type="button">Button</button> <button class="btn btn-outline-secondary" type="button">Button</button>
<button class="btn btn-outline-secondary" type="button">Button</button> <button class="btn btn-outline-secondary" type="button">Button</button>
</div> </div>
<input type="text" class="form-control" placeholder="" aria-label="" aria-describedby="basic-addon1"> <input type="text" class="form-control" placeholder="" aria-label="Example text with two button addons" aria-describedby="button-addon3">
</div> </div>
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="basic-addon2"> <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username with two button addons" aria-describedby="button-addon4">
<div class="input-group-append"> <div class="input-group-append" id="button-addon4">
<button class="btn btn-outline-secondary" type="button">Button</button> <button class="btn btn-outline-secondary" type="button">Button</button>
<button class="btn btn-outline-secondary" type="button">Button</button> <button class="btn btn-outline-secondary" type="button">Button</button>
</div> </div>
@ -287,7 +287,7 @@ Input groups include support for custom selects and custom file inputs. Browser
<div class="input-group-prepend"> <div class="input-group-prepend">
<button class="btn btn-outline-secondary" type="button">Button</button> <button class="btn btn-outline-secondary" type="button">Button</button>
</div> </div>
<select class="custom-select" id="inputGroupSelect03"> <select class="custom-select" id="inputGroupSelect03" aria-label="Example select with button addon">
<option selected>Choose...</option> <option selected>Choose...</option>
<option value="1">One</option> <option value="1">One</option>
<option value="2">Two</option> <option value="2">Two</option>
@ -296,7 +296,7 @@ Input groups include support for custom selects and custom file inputs. Browser
</div> </div>
<div class="input-group"> <div class="input-group">
<select class="custom-select" id="inputGroupSelect04"> <select class="custom-select" id="inputGroupSelect04" aria-label="Example select with button addon">
<option selected>Choose...</option> <option selected>Choose...</option>
<option value="1">One</option> <option value="1">One</option>
<option value="2">Two</option> <option value="2">Two</option>
@ -314,10 +314,10 @@ Input groups include support for custom selects and custom file inputs. Browser
{% capture example %} {% capture example %}
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text">Upload</span> <span class="input-group-text" id="inputGroupFileAddon01">Upload</span>
</div> </div>
<div class="custom-file"> <div class="custom-file">
<input type="file" class="custom-file-input" id="inputGroupFile01"> <input type="file" class="custom-file-input" id="inputGroupFile01" aria-describedby="inputGroupFileAddon01">
<label class="custom-file-label" for="inputGroupFile01">Choose file</label> <label class="custom-file-label" for="inputGroupFile01">Choose file</label>
</div> </div>
</div> </div>
@ -325,30 +325,30 @@ Input groups include support for custom selects and custom file inputs. Browser
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="custom-file"> <div class="custom-file">
<input type="file" class="custom-file-input" id="inputGroupFile02"> <input type="file" class="custom-file-input" id="inputGroupFile02">
<label class="custom-file-label" for="inputGroupFile02">Choose file</label> <label class="custom-file-label" for="inputGroupFile02" aria-describedby="inputGroupFileAddon02">Choose file</label>
</div> </div>
<div class="input-group-append"> <div class="input-group-append">
<span class="input-group-text" id="">Upload</span> <span class="input-group-text" id="inputGroupFileAddon02">Upload</span>
</div> </div>
</div> </div>
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-prepend">
<button class="btn btn-outline-secondary" type="button">Button</button> <button class="btn btn-outline-secondary" type="button" id="inputGroupFileAddon03">Button</button>
</div> </div>
<div class="custom-file"> <div class="custom-file">
<input type="file" class="custom-file-input" id="inputGroupFile03"> <input type="file" class="custom-file-input" id="inputGroupFile03" aria-describedby="inputGroupFileAddon03">
<label class="custom-file-label" for="inputGroupFile03">Choose file</label> <label class="custom-file-label" for="inputGroupFile03">Choose file</label>
</div> </div>
</div> </div>
<div class="input-group"> <div class="input-group">
<div class="custom-file"> <div class="custom-file">
<input type="file" class="custom-file-input" id="inputGroupFile04"> <input type="file" class="custom-file-input" id="inputGroupFile04" aria-describedby="inputGroupFileAddon04">
<label class="custom-file-label" for="inputGroupFile04">Choose file</label> <label class="custom-file-label" for="inputGroupFile04">Choose file</label>
</div> </div>
<div class="input-group-append"> <div class="input-group-append">
<button class="btn btn-outline-secondary" type="button">Button</button> <button class="btn btn-outline-secondary" type="button" id="inputGroupFileAddon04">Button</button>
</div> </div>
</div> </div>
{% endcapture %} {% endcapture %}