Skip to content

Commit

Permalink
fix(ui5-checkbox): ensure consistent focus behavior
Browse files Browse the repository at this point in the history
Ensure focus is applied consistently around the checkbox container and
respective text, aligning behavior with other components.

Fixes #10566
  • Loading branch information
kgogov committed Jan 23, 2025
1 parent d0d3cc5 commit 4af25be
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/main/src/themes/CheckBox.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
position: relative;
display: inline-flex;
align-items: center;
width: 100%;
max-width: 100%;
min-height: var(--_ui5_checkbox_width_height);
min-width: var(--_ui5_checkbox_width_height);
padding: 0 var(--_ui5_checkbox_wrapper_padding);
Expand Down
11 changes: 11 additions & 0 deletions packages/main/test/pages/CheckBox.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@
<input type="hidden" id="cbFormSubmitted" value="false" />
</form>

<br />
<div style="width: 300px; border: 1px solid black; padding: 1rem;">
<ui5-checkbox style="width: 100%; border: 1px solid red;"></ui5-checkbox>
<ui5-radio-button style="width: 100%; border: 1px solid red;"></ui5-radio-button>
<ui5-switch style="width: 100%; border: 1px solid red;"></ui5-switch>
<hr />
<ui5-checkbox style="width: 100%; border: 1px solid red;" text="Some text"></ui5-checkbox>
<ui5-radio-button style="width: 100%; border: 1px solid red;" text="Some text"></ui5-radio-button>
<ui5-switch style="width: 100%; border: 1px solid red;"></ui5-switch>
</div>

<script>
var hcb = false;
var cbForm = document.querySelector("#cbForm");
Expand Down

0 comments on commit 4af25be

Please sign in to comment.