-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #5: Add radio group component. #72
Conversation
src/components/calcite-radio-group-item/calcite-radio-group-item.tsx
Outdated
Show resolved
Hide resolved
}); | ||
}); | ||
|
||
describe("WAI-ARIA Roles, States, and Properties", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how you've broken up the tests into sections 👌
@jcfranco if you use |
Also, you asked for feedback on css vars: I am not totally sure what our strategy should be. In We could also have a css var that operates library-wide, allowing people to theme these components really easily by setting the one spot color to their branded color and having it cascade all the way through the components. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@jcfranco I just noticed that the external inputs appear in the tab order, even though they are hidden. |
@paulcpederson On it! |
@paulcpederson Fixed. The external inputs were still being rendered in the DOM. |
* Fix cursor not showing up on item label. * Tweak colors. * Rename vars.
|
…e empty with a start/end icon (#9300) *Related Issue:** #6413 ## Summary This updates `segmented-control-item` to display a centered icon when specified and the item is empty. **Note:** this removes using `value` as a fallback label as non-breaking for the following reasons: * this behavior is [intentional](https://github.com/Esri/calcite-design-system/blob/main/packages/calcite-components/src/components/segmented-control-item/segmented-control-item.e2e.ts#L38-L46), but there is no explicit spec for it in the [original issue](#5), [PR](#72) nor [documentation](https://developers.arcgis.com/calcite-design-system/components/segmented-control/) * it is inconsistent with how other components expect text to be provided * it [breaks if there's any whitespace](https://codepen.io/jcfranco/pen/XWwWGEy?editors=1000) * the current behavior will lead to label that might not be user-friendly in most cases (e.g., casing, localization)
Related Issue: #5
This adds the
RadioGroup
andRadioGroupItem
components.API
Questions
Since item components are not meant to be used outside, would it be cleaner to hide the internal event and rename the group's event toChanged tocalciteRadioGroupChange
?calciteRadioGroupChange
.selected
instead ofchecked
be a better fit since there's no visual checkmark in this design?Notes
<calcite-radio-group>
is left to users (viaaria-labelledby
or<label>
). Alternatively, we could introduce<calcite-radio-group-title>
, design permitting.For Radio Group Contained in a Toolbar
section.focus()
on the group component does not work as expected. I'll create a separate issue for this.