Skip to content

Commit 7c5d09a

Browse files
d-koppenhagengithub-actions[bot]mfranzkenmerget
authored
feat: add property requiredAnnotation to disable visual indicator (*) for semantically marked required form elements (#4366)
* feat: add property `requiredAnnotation` to disable visual indicator (`*`) for semantically marked required form elements closes #4197 * auto update snapshots (#4367) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: update property showRequiredAsterisk --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Maximilian Franzke <[email protected]> Co-authored-by: Nicolas Merget <[email protected]>
1 parent 70d5a02 commit 7c5d09a

File tree

20 files changed

+59
-35
lines changed

20 files changed

+59
-35
lines changed
22 Bytes
Loading
-4 Bytes
Loading
1 Byte
Loading
7 Bytes
Loading
35 Bytes
Loading
-4 Bytes
Loading

docs/how-to-develop-a-component.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ We use [Mitosis](https://github.com/BuilderIO/Mitosis/tree/main/docs) to develop
6363
3. Try to parameterize a lot: For example if your component includes an icon button you should give it a text for accessibility. You should provide a default text, so it can't be empty, but you should also let the user change it with a property e.g. `iconButtonText`.
6464
4. To enable some native functionalities for Vue and Angular (`v-model` and `[(ng-model)]`) you might need to add some extra code to your component. At the generation process you might select `formValue` anyhow, but otherwise take a look at the `input` to see what you need to add to make this work.
6565
5. Angular can be challenging; here are some issues to be aware of:
66+
6667
1. Angular generates custom HTML tags as wrappers, which may affect your `CSS` selectors. For example if we have a button inside our component and we try to change the styling with `.db-button: {xxx:abc;}` it would not add the styling to the button. As a workaround you should write `.db-button, .db-button > button: {xxx:abc;}` to cover Angular as well:
6768

6869
```html

docs/research/table.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Across the surveyed design systems, there is a kind of pattern for tables:
3232
This ensures maximum accessibility out of the box, since screen readers and keyboard users already understand native table structures.
3333

3434
2. **Progressive Enhancement of Interactivity**
35+
3536
- **Static by Default**: Some systems stick to purely static tables with CSS-based styling (striped rows, borders) and responsive wrappers for horizontal scrolling. Those have no built-in interactivity (sorting, pagination, etc.).
3637
- **Developer-Driven Features**: Several systems provide core table markup plus optional wrappers or slots for sorting, sticky headers, and scroll controls, leaving the actual user-driven logic to the implementer.
3738
- **Built-in Data Tables**: Other systems offer rich, pre-wired data table components with pagination, sorting, row selection, expandable rows, and more. These components manage state, callbacks, and ARIA attributes internally.

packages/components/src/components/checkbox/checkbox.lite.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ export default function DBCheckbox(props: DBCheckboxProps) {
192192
disabled={getBoolean(props.disabled, 'disabled')}
193193
value={props.value}
194194
required={getBoolean(props.required, 'required')}
195+
data-hide-asterisk={getHideProp(props.showRequiredAsterisk)}
195196
onChange={(event: ChangeEvent<HTMLInputElement>) =>
196197
state.handleChange(event)
197198
}

packages/components/src/components/custom-select/custom-select.lite.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
useStore,
1111
useTarget
1212
} from '@builder.io/mitosis';
13+
1314
import {
1415
DEFAULT_CLOSE_BUTTON,
1516
DEFAULT_INVALID_MESSAGE,
@@ -814,6 +815,7 @@ export default function DBCustomSelect(props: DBCustomSelectProps) {
814815
: props.variant
815816
}
816817
data-required={getBooleanAsString(props.required)}
818+
data-hide-asterisk={getHideProp(props.showRequiredAsterisk)}
817819
data-placement={props.placement}
818820
data-selected-type={props.multiple ? props.selectedType : 'text'}
819821
data-hide-label={getHideProp(props.showLabel)}

0 commit comments

Comments
 (0)