3

I'm doing a front-end web development learning a course that employs Bootstrap components.

In the documentation for Bootstrap checkbox and radio buttons, they have the following, unexplained attribute: autocomplete=off, and I can't understand why it is used in the context of checkbox and radio buttons.

Here is a link to the documentation: https://getbootstrap.com/docs/4.0/components/buttons/#checkbox-and-radio-buttons

And here is an example of a code snippet:

<div class="btn-group-toggle" data-toggle="buttons">
  <label class="btn btn-secondary active">
    <input type="checkbox" checked autocomplete="off" /> Checked
  </label>
</div>

It seems autocomplete predicts the value for a form input, but this is a button that has been set to active, so there is nothing to predict. So, it seems to me that autocomplete is irrelevant in the context of buttons, so why to specify it at all?

Kate Orlova
  • 3,225
  • 5
  • 11
  • 35
Oliver Farren
  • 545
  • 1
  • 5
  • 15
  • For that you'd have to ask the Bootstrap developers...not SO users. – Paulie_D Mar 20 '20 at 12:42
  • 1
    Does this answer your question? [Bug With Firefox - Disabled Attribute of Input Not Resetting When Refreshing](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) – str Mar 20 '20 at 12:44
  • 1
    [MDN note](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#Values) (scroll down to the second yellow box), [bug report](https://bugzilla.mozilla.org/show_bug.cgi?id=654072), [comment by a Bootstrap team member](https://bugzilla.mozilla.org/show_bug.cgi?id=654072#c30), [bug report in the Bootstrap repository](https://github.com/twbs/bootstrap/issues/793), [note in the Bootstrap documentation](https://getbootstrap.com/docs/3.4/javascript/#buttons). – str Mar 20 '20 at 12:46

0 Answers0