Better descriptions for checkbox attributes (#894)

The description for the checkbox's value attribute is currently "the checkbox's value attribute." I think we can do better than that, especially considering anyone who hasn't worked with old-school HTML forms that POST to the URL in the `action` attribute is unlikely to know why a checkbox has a value and that value is not boolean. 

While I was here I improved a couple of other descriptions. If there's an interest, I can expand this PR to update all of the properties in all controls where the description is tautological.
pull/897/head
Patrick McElhaney 2022-08-31 17:14:34 -04:00 zatwierdzone przez GitHub
rodzic 08b5da7c56
commit 9fc4185f87
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -42,13 +42,13 @@ export default class SlCheckbox extends ShoelaceElement {
@state() private hasFocus = false;
/** The checkbox's name attribute. */
/** Name of the HTML form control. Submitted with the form as part of a name/value pair. */
@property() name: string;
/** The checkbox's value attribute. */
/** Value of the HTML form control. Primarily used to differentiate a list of related checkboxes that have the same name. */
@property() value: string;
/** Disables the checkbox. */
/** Disables the checkbox (so the user can't check / uncheck it). */
@property({ type: Boolean, reflect: true }) disabled = false;
/** Makes the checkbox a required field. */
@ -57,7 +57,7 @@ export default class SlCheckbox extends ShoelaceElement {
/** Draws the checkbox in a checked state. */
@property({ type: Boolean, reflect: true }) checked = false;
/** Draws the checkbox in an indeterminate state. */
/** Draws the checkbox in an indeterminate state. Usually applies to a checkbox that represents "select all" or "select none" when the items to which it applies are a mix of selected and unselected. */
@property({ type: Boolean, reflect: true }) indeterminate = false;
/** This will be true when the control is in an invalid state. Validity is determined by the `required` prop. */