Skip to content

Commit

Permalink
Exploring Unnecessary Conditionals: Mutually-Exclusive (#3076)
Browse files Browse the repository at this point in the history
* adding missing params in doc

* changes in documentation

* changes in documentation

* changes in doc

* Changes in doc

* Removed duplicate legendclass in doc
  • Loading branch information
SriHV authored Mar 11, 2024
1 parent 2a74994 commit 23c358f
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/components/mutually-exclusive/_macro-options.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
| Name | Type | Required | Description |
| ------------------------- | ------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| exclusiveOptions | `Array<Checkbox>` or `Array<radio>` | true | Configuration for the mutually exclusive options |
| or | string | false | Text for the “Or” label that separates the mutually exclusive checkbox from the answer options, defaults to "Or". |
| deselectMessage | string | true | The text the aria-live alert will announce to warn that selecting the exclusive checkbox will clear or unselect all other answer options. For example, ”Selecting this will uncheck all other checkboxes”. |
| deselectGroupAdjective | string | true | The text the aria-live alert will announce when an answer option is cleared or unselected when the mutually exclusive checkbox is selected |
| deselectCheckboxAdjective | string | true | The text the aria-live alert will announce when the mutually exclusive checkbox is unselected when an answer option is selected or entered |
| error | `Error` [_(ref)_](/components/error) | false | Configuration for validation errors |
| Name | Type | Required | Description |
| -------------------------------- | ------------------------------------ | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id | string | false | The HTML `id` of the fieldset |
| classes | string | false | Classes to apply to the fieldset |
| legend | string | true (unless `legendIsQuestionTitle` is set) | Text for the fieldset’s legend |
| legendClasses | string | false | Classes to apply to the legend element |
| legendIsQuestionTitle | boolean | true (unless `legend` is set) | Creates an `h1` inside the `legend`. Use when there is only a single fieldset on the page |
| description | string | false | Description for the fieldset |
| attributes | object | false | HTML attributes (for example, data attributes) to add to the fieldset |
| exclusiveOptions | `Array<Checkbox>` or `Array<radio>` | true | Configuration for the mutually exclusive options |
| or | string | false | Text for the “Or” label that separates the mutually exclusive checkbox from the answer options, defaults to "Or". |
| deselectMessage | string | true | The text the aria-live alert will announce to warn that selecting the exclusive checkbox will clear or unselect all other answer options. For example, ”Selecting this will uncheck all other checkboxes”. |
| deselectGroupAdjective | string | true | The text the aria-live alert will announce when an answer option is cleared or unselected when the mutually exclusive checkbox is selected |
| deselectExclusiveOptionAdjective | string | true | The text the aria-live alert will announce when an option is cleared or unselected when the mutually exclusive checkbox is selected |
| error | `Error` [_(ref)_](/components/error) | false | Configuration for validation errors |
| dontWrap | boolean | false | Prevents fields,checkboxes,date input,duration,input and Textarea from being wrapped in a [fieldset component](/components/fieldset) |
| autosuggestresults | string | false | Shows suggested options to users as they enter something into an input field |

0 comments on commit 23c358f

Please sign in to comment.