Skip to content

Commit

Permalink
fix: checkbox accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebus-84 committed Dec 23, 2024
1 parent 72ea3f2 commit c7b262e
Show file tree
Hide file tree
Showing 5 changed files with 715 additions and 36 deletions.
1 change: 1 addition & 0 deletions src/components/activity-card/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| ------------- | ------------- | ----------- | --------- | ----------- |
| `date` | `date` | | `string` | `undefined` |
| `description` | `description` | | `string` | `undefined` |
| `href` | `href` | | `string` | `undefined` |
| `logo` | `logo` | | `string` | `undefined` |
| `message` | `message` | | `string` | `undefined` |
| `read` | `read` | | `boolean` | `false` |
Expand Down
12 changes: 12 additions & 0 deletions src/components/checkbox/d-checkbox.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
:host {
display: block;

}
ion-checkbox {
--checkbox-background: var(--on-alt);
--size: 48px;
--checkbox-background-checked: var(--accent)
}
ion-checkbox::part(container) {
border-radius: 0;
border: 2px solid;
border-color: var(--highlight);
--checkmark-color: var(--stroke);
}
2 changes: 1 addition & 1 deletion src/components/checkbox/d-checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class DCheckbox {
return (
<Host>
<d-vertical-stack>
<d-horizontal-stack>
<d-horizontal-stack class="items-center">
<ion-checkbox onIonChange={e => this.updateValue(e.detail.checked)} checked={this.checked}></ion-checkbox>
<div>
<slot />
Expand Down
2 changes: 1 addition & 1 deletion src/components/checkbox/test/d-checkbox.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('d-checkbox', () => {
<d-checkbox>
<mock:shadow-root>
<d-vertical-stack>
<d-horizontal-stack>
<d-horizontal-stack class="items-center">
<ion-checkbox></ion-checkbox>
<div>
<slot></slot>
Expand Down
Loading

0 comments on commit c7b262e

Please sign in to comment.