Skip to content

Commit

Permalink
feat(checkbox): add checkbox missing focus on tab (#30075)
Browse files Browse the repository at this point in the history
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added ion-focusable class to ion-checkbox
- Replaced ionic focus styles for focus mixin

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Ionic states
sample](https://ionic-framework-my9hzgra2-ionic1.vercel.app/src/components/checkbox/test/states?ionic:theme=ionic)

---------

Co-authored-by: ionitron <[email protected]>
  • Loading branch information
BenOsodrac and Ionitron authored Dec 12, 2024
1 parent 85e12dd commit fec23e8
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/components/checkbox/checkbox.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,7 @@ input {
// --------------------------------------------------
// Only show the focus ring when the checkbox is focused and not disabled
:host(.ion-focused:not(.checkbox-disabled)) .native-wrapper {
outline: var(--focus-ring-width) globals.$ion-border-style-solid var(--focus-ring-color);
outline-offset: var(--focus-ring-offset);
@include globals.focused-state(var(--focus-ring-width), globals.$ion-border-style-solid, var(--focus-ring-color));
}

// Checkbox: Active
Expand Down
1 change: 1 addition & 0 deletions core/src/components/checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ export class Checkbox implements ComponentInterface {
'in-item': hostContext('ion-item', el),
'checkbox-checked': checked,
'checkbox-disabled': disabled,
'ion-focusable': true,
'checkbox-indeterminate': indeterminate,
interactive: true,
[`checkbox-justify-${justify}`]: justify !== undefined,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fec23e8

Please sign in to comment.