lyne-components
lyne-components copied to clipboard
story(sbb-radio-button): implement native form support
Similar to the sbb-checkbox, we want to implement native form support for the sbb-radio-button. Be aware that the details of the radio button are different to the checkbox (e.g. the special handling for checked in checkbox is not necessary for the radio button).
Also affects radio button panel.
- Create a form-associated-radio-button-mixin.ts
- Remove the inner input.
- Evaluate whether we can support usage without a radio button group. There is no intention to remove the group, but there could be use cases, where a radio button should be used without a group. (If the complexity or effort is too large, this can be split into its own issue)
- Without group, the name should determine connection
- e.g. arrow key navigation could be achieved by using a registry, which links all radio buttons with the same name
- value in radio group could be refactored to a getter/setter like tag-group
Avoid breaking changes (deprecations are ok)
Ref: https://www.w3.org/WAI/ARIA/apg/patterns/radio/