Skip to content

Commit 847e6a0

Browse files
merge release-8.5.3 (#30331)
v8.5.3
2 parents b9c5b9b + 37fb269 commit 847e6a0

31 files changed

+240
-101
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [8.5.3](https://github.com/ionic-team/ionic-framework/compare/v8.5.2...v8.5.3) (2025-04-02)
7+
8+
9+
### Bug Fixes
10+
11+
* **checkbox:** ensure proper visual selection when navigating via VoiceOver in Safari ([#30300](https://github.com/ionic-team/ionic-framework/issues/30300)) ([bb40a1e](https://github.com/ionic-team/ionic-framework/commit/bb40a1efe71237075db2f3a536eddeb1d7c400fc))
12+
* **overlays:** exclude backdrop-no-scroll class when toast is presented ([#30123](https://github.com/ionic-team/ionic-framework/issues/30123)) ([7f9df7a](https://github.com/ionic-team/ionic-framework/commit/7f9df7a89447e51eec0b1516069a1e0c9c9722e5)), closes [#30112](https://github.com/ionic-team/ionic-framework/issues/30112)
13+
* **segment-view:** prevent vertical scroll while scrolling horizontally ([#30276](https://github.com/ionic-team/ionic-framework/issues/30276)) ([105796f](https://github.com/ionic-team/ionic-framework/commit/105796f6bc8f961f58ecbb101285097cc86891c0)), closes [#30001](https://github.com/ionic-team/ionic-framework/issues/30001)
14+
15+
16+
17+
18+
619
## [8.5.2](https://github.com/ionic-team/ionic-framework/compare/v8.5.1...v8.5.2) (2025-03-26)
720

821

core/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [8.5.3](https://github.com/ionic-team/ionic-framework/compare/v8.5.2...v8.5.3) (2025-04-02)
7+
8+
9+
### Bug Fixes
10+
11+
* **checkbox:** ensure proper visual selection when navigating via VoiceOver in Safari ([#30300](https://github.com/ionic-team/ionic-framework/issues/30300)) ([bb40a1e](https://github.com/ionic-team/ionic-framework/commit/bb40a1efe71237075db2f3a536eddeb1d7c400fc))
12+
* **overlays:** exclude backdrop-no-scroll class when toast is presented ([#30123](https://github.com/ionic-team/ionic-framework/issues/30123)) ([7f9df7a](https://github.com/ionic-team/ionic-framework/commit/7f9df7a89447e51eec0b1516069a1e0c9c9722e5)), closes [#30112](https://github.com/ionic-team/ionic-framework/issues/30112)
13+
* **segment-view:** prevent vertical scroll while scrolling horizontally ([#30276](https://github.com/ionic-team/ionic-framework/issues/30276)) ([105796f](https://github.com/ionic-team/ionic-framework/commit/105796f6bc8f961f58ecbb101285097cc86891c0)), closes [#30001](https://github.com/ionic-team/ionic-framework/issues/30001)
14+
15+
16+
17+
18+
619
## [8.5.2](https://github.com/ionic-team/ionic-framework/compare/v8.5.1...v8.5.2) (2025-03-26)
720

821

core/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ionic/core",
3-
"version": "8.5.2",
3+
"version": "8.5.3",
44
"description": "Base components for Ionic",
55
"keywords": [
66
"ionic",

core/src/components/checkbox/checkbox.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,12 @@
111111
display: none;
112112
}
113113

114+
/**
115+
* The native input must be hidden with display instead of visibility or
116+
* aria-hidden to avoid accessibility issues with nested interactive elements.
117+
*/
114118
input {
115-
@include visually-hidden();
119+
display: none;
116120
}
117121

118122
.native-wrapper {

core/src/components/checkbox/checkbox.tsx

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import type { CheckboxChangeEventDetail } from './checkbox-interface';
3131
})
3232
export class Checkbox implements ComponentInterface {
3333
private inputId = `ion-cb-${checkboxIds++}`;
34+
private inputLabelId = `${this.inputId}-lbl`;
3435
private helperTextId = `${this.inputId}-helper-text`;
3536
private errorTextId = `${this.inputId}-error-text`;
3637
private focusEl?: HTMLElement;
@@ -181,6 +182,15 @@ export class Checkbox implements ComponentInterface {
181182
this.ionBlur.emit();
182183
};
183184

185+
private onKeyDown = (ev: KeyboardEvent) => {
186+
if (ev.key === ' ') {
187+
ev.preventDefault();
188+
if (!this.disabled) {
189+
this.toggleChecked(ev);
190+
}
191+
}
192+
};
193+
184194
private onClick = (ev: MouseEvent) => {
185195
if (this.disabled) {
186196
return;
@@ -250,14 +260,23 @@ export class Checkbox implements ComponentInterface {
250260
} = this;
251261
const mode = getIonMode(this);
252262
const path = getSVGPath(mode, indeterminate);
263+
const hasLabelContent = el.textContent !== '';
253264

254265
renderHiddenInput(true, el, name, checked ? value : '', disabled);
255266

267+
// The host element must have a checkbox role to ensure proper VoiceOver
268+
// support in Safari for accessibility.
256269
return (
257270
<Host
271+
role="checkbox"
258272
aria-checked={indeterminate ? 'mixed' : `${checked}`}
259273
aria-describedby={this.getHintTextID()}
260274
aria-invalid={this.getHintTextID() === this.errorTextId}
275+
aria-labelledby={hasLabelContent ? this.inputLabelId : null}
276+
aria-label={inheritedAttributes['aria-label'] || null}
277+
aria-disabled={disabled ? 'true' : null}
278+
tabindex={disabled ? undefined : 0}
279+
onKeyDown={this.onKeyDown}
261280
class={createColorClasses(color, {
262281
[mode]: true,
263282
'in-item': hostContext('ion-item', el),
@@ -271,7 +290,7 @@ export class Checkbox implements ComponentInterface {
271290
})}
272291
onClick={this.onClick}
273292
>
274-
<label class="checkbox-wrapper">
293+
<label class="checkbox-wrapper" htmlFor={inputId}>
275294
{/*
276295
The native control must be rendered
277296
before the visible label text due to https://bugs.webkit.org/show_bug.cgi?id=251951
@@ -291,9 +310,10 @@ export class Checkbox implements ComponentInterface {
291310
<div
292311
class={{
293312
'label-text-wrapper': true,
294-
'label-text-wrapper-hidden': el.textContent === '',
313+
'label-text-wrapper-hidden': !hasLabelContent,
295314
}}
296315
part="label"
316+
id={this.inputLabelId}
297317
>
298318
<slot></slot>
299319
{this.renderHintText()}

core/src/components/segment-content/segment-content.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,17 @@
88
flex-shrink: 0;
99

1010
width: 100%;
11+
12+
overflow-y: scroll;
13+
14+
/* Hide scrollbar in Firefox */
15+
scrollbar-width: none;
16+
17+
/* Hide scrollbar in IE and Edge */
18+
-ms-overflow-style: none;
19+
20+
/* Hide scrollbar in webkit */
21+
&::-webkit-scrollbar {
22+
display: none;
23+
}
1124
}

core/src/utils/overlays.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,9 @@ export const present = async <OverlayPresentOptions>(
520520
*/
521521
if (overlay.el.tagName !== 'ION-TOAST') {
522522
setRootAriaHidden(true);
523+
document.body.classList.add(BACKDROP_NO_SCROLL);
523524
}
524525

525-
document.body.classList.add(BACKDROP_NO_SCROLL);
526-
527526
hideUnderlyingOverlaysFromScreenReaders(overlay.el);
528527
hideAnimatingOverlayFromScreenReaders(overlay.el);
529528

@@ -646,6 +645,8 @@ export const dismiss = async <OverlayDismissOptions>(
646645
return false;
647646
}
648647

648+
const presentedOverlays = doc !== undefined ? getPresentedOverlays(doc) : [];
649+
649650
/**
650651
* For accessibility, toasts lack focus traps and don’t receive
651652
* `aria-hidden` on the root element when presented.
@@ -657,7 +658,7 @@ export const dismiss = async <OverlayDismissOptions>(
657658
* Therefore, we must remove `aria-hidden` from the root element
658659
* when the last non-toast overlay is dismissed.
659660
*/
660-
const overlaysNotToast = doc !== undefined ? getPresentedOverlays(doc).filter((o) => o.tagName !== 'ION-TOAST') : [];
661+
const overlaysNotToast = presentedOverlays.filter((o) => o.tagName !== 'ION-TOAST');
661662

662663
const lastOverlayNotToast = overlaysNotToast.length === 1 && overlaysNotToast[0].id === overlay.el.id;
663664

core/src/utils/test/overlays/overlays-scroll-blocking.spec.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { newSpecPage } from '@stencil/core/testing';
22

33
import { Modal } from '../../../components/modal/modal';
4+
import { Toast } from '../../../components/toast/toast';
45

56
describe('overlays: scroll blocking', () => {
67
it('should not block scroll when the overlay is created', async () => {
@@ -85,4 +86,25 @@ describe('overlays: scroll blocking', () => {
8586

8687
expect(body).not.toHaveClass('backdrop-no-scroll');
8788
});
89+
90+
// Fixes https://github.com/ionic-team/ionic-framework/issues/30112
91+
it('should not block scroll when the toast overlay is presented', async () => {
92+
const page = await newSpecPage({
93+
components: [Toast],
94+
html: `
95+
<ion-toast></ion-toast>
96+
`,
97+
});
98+
99+
const toast = page.body.querySelector('ion-toast')!;
100+
const body = page.doc.querySelector('body')!;
101+
102+
await toast.present();
103+
104+
expect(body).not.toHaveClass('backdrop-no-scroll');
105+
106+
await toast.dismiss();
107+
108+
expect(body).not.toHaveClass('backdrop-no-scroll');
109+
});
88110
});

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"core",
44
"packages/*"
55
],
6-
"version": "8.5.2"
6+
"version": "8.5.3"
77
}

0 commit comments

Comments
 (0)