Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [9.0.10](https://github.com/ionic-team/ionic-framework/compare/v9.0.9...v9.0.10) (2026-10-28)

### Bug Fixes

* **alert:** only block Enter on checkbox inputs, not the whole document ([#31643](https://github.com/ionic-team/ionic-framework/issues/31643)) ([28d2940](https://github.com/ionic-team/ionic-framework/commit/28d294035a6de45e797467d9aaca83b95d3baf4a)), closes [#30811](https://github.com/ionic-team/ionic-framework/issues/30811)
* **menu:** allow menus inside split pane main content to open ([#31586](https://github.com/ionic-team/ionic-framework/issues/31586)) ([3eebee3](https://github.com/ionic-team/ionic-framework/commit/3eebee37bd13f52fc7d87cb468986d16138acf40)), closes [#30591](https://github.com/ionic-team/ionic-framework/issues/30591) [#28801](https://github.com/ionic-team/ionic-framework/issues/28801)
* **rtl:** respect `dir` of ancestor elements throughout components ([#31459](https://github.com/ionic-team/ionic-framework/issues/31459)) ([25a114f](https://github.com/ionic-team/ionic-framework/commit/25a114f4077cae0aa2d633e32d26638096eeb9f1))
* **vue:** render resolved href for object router-link ([#31663](https://github.com/ionic-team/ionic-framework/issues/31663)) ([d73cacb](https://github.com/ionic-team/ionic-framework/commit/d73cacbc5891aa982b078f8e3554a5e14a8fb1bb)), closes [#30848](https://github.com/ionic-team/ionic-framework/issues/30848)


## [9.0.9](https://github.com/ionic-team/ionic-framework/compare/v9.0.8...v9.0.9) (2026-10-21)

### Bug Fixes
Expand Down
10 changes: 10 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [9.0.10](https://github.com/ionic-team/ionic-framework/compare/v9.0.9...v9.0.10) (2026-10-28)

### Bug Fixes

* **alert:** only block Enter on checkbox inputs, not the whole document ([#31643](https://github.com/ionic-team/ionic-framework/issues/31643)) ([28d2940](https://github.com/ionic-team/ionic-framework/commit/28d294035a6de45e797467d9aaca83b95d3baf4a)), closes [#30811](https://github.com/ionic-team/ionic-framework/issues/30811)
* **menu:** allow menus inside split pane main content to open ([#31586](https://github.com/ionic-team/ionic-framework/issues/31586)) ([3eebee3](https://github.com/ionic-team/ionic-framework/commit/3eebee37bd13f52fc7d87cb468986d16138acf40)), closes [#30591](https://github.com/ionic-team/ionic-framework/issues/30591) [#28801](https://github.com/ionic-team/ionic-framework/issues/28801)
* **rtl:** respect `dir` of ancestor elements throughout components ([#31459](https://github.com/ionic-team/ionic-framework/issues/31459)) ([25a114f](https://github.com/ionic-team/ionic-framework/commit/25a114f4077cae0aa2d633e32d26638096eeb9f1))
* **vue:** render resolved href for object router-link ([#31663](https://github.com/ionic-team/ionic-framework/issues/31663)) ([d73cacb](https://github.com/ionic-team/ionic-framework/commit/d73cacbc5891aa982b078f8e3554a5e14a8fb1bb)), closes [#30848](https://github.com/ionic-team/ionic-framework/issues/30848)


## [9.0.9](https://github.com/ionic-team/ionic-framework/compare/v9.0.8...v9.0.9) (2026-10-21)

### Bug Fixes
Expand Down
104 changes: 67 additions & 37 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "9.0.9",
"version": "9.0.10",
"description": "Base components for Ionic",
"engines": {
"node": ">= 16"
Expand Down Expand Up @@ -86,7 +86,7 @@
"@stencil/angular-output-target": "^1.5.0",
"@stencil/react-output-target": "^1.6.2",
"@stencil/sass": "^3.0.9",
"@stencil/vue-output-target": "0.14.6",
"@stencil/vue-output-target": "0.14.7",
"@types/jest": "^29.5.6",
"@types/node": "^24.13.3",
"@typescript-eslint/eslint-plugin": "^8.0.0",
Expand Down Expand Up @@ -117,6 +117,9 @@
"@typescript-eslint/parser": "$@typescript-eslint/parser",
"@typescript-eslint/eslint-plugin": "$@typescript-eslint/eslint-plugin",
"eslint-plugin-import": "$eslint-plugin-import"
},
"serve": {
"compression": "^1.8.2"
}
},
"scripts": {
Expand Down
19 changes: 10 additions & 9 deletions core/src/components/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,6 @@ export class Alert implements ComponentInterface, OverlayInterface {
onKeydown(ev: any) {
const inputTypes = new Set(this.processedInputs.map((i) => i.type));

/**
* Based on keyboard navigation requirements, the
* checkbox should not respond to the enter keydown event.
*/
if (inputTypes.has('checkbox') && ev.key === 'Enter') {
ev.preventDefault();
return;
}

/**
* Ensure when alert container is being focused, and the user presses the tab + shift keys, the focus will be set to the last alert button.
*/
Expand Down Expand Up @@ -527,6 +518,15 @@ export class Alert implements ComponentInterface, OverlayInterface {
forceUpdate(this);
}

/**
* Prevent Enter from toggling the checkbox, which only Space should do.
*/
private onCheckboxKeydown = (ev: KeyboardEvent) => {
if (ev.key === 'Enter') {
ev.preventDefault();
}
};

private async buttonClick(button: AlertButton) {
const role = button.role;
const values = this.getValues();
Expand Down Expand Up @@ -627,6 +627,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
<button
type="button"
onClick={() => this.cbClick(i)}
onKeyDown={this.onCheckboxKeydown}
aria-checked={`${i.checked}`}
id={i.id}
disabled={i.disabled}
Expand Down
63 changes: 63 additions & 0 deletions core/src/components/alert/test/a11y/alert.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,69 @@ configs({ directions: ['ltr'] }).forEach(({ config, title }) => {
});
});

/**
* This behavior does not vary across modes/directions
*/
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
test.describe(title('alert: Enter key with checkbox inputs'), () => {
test('should not block Enter in elements outside of the alert', async ({ page }, testInfo) => {
testInfo.annotations.push({
type: 'issue',
description: 'https://github.com/ionic-team/ionic-framework/issues/30811',
});

await page.setContent(
`
<textarea></textarea>
<ion-alert header="Alert"></ion-alert>

<script>
const alert = document.querySelector('ion-alert');
alert.inputs = [{ type: 'checkbox', label: 'Checkbox', value: 'checkbox' }];
</script>
`,
config
);

// The alert isn't presented since it would trap focus away from the textarea
const textarea = page.locator('textarea');
await textarea.click();
await textarea.press('a');
await textarea.press('Enter');
await textarea.press('b');

await expect(textarea).toHaveValue('a\nb');
});

test('should dismiss the alert when pressing Enter on a button', async ({ page }) => {
await page.setContent(
`
<ion-alert header="Alert"></ion-alert>

<script>
const alert = document.querySelector('ion-alert');
alert.inputs = [{ type: 'checkbox', label: 'Checkbox', value: 'checkbox' }];
alert.buttons = ['OK'];
</script>
`,
config
);

const ionAlertDidPresent = await page.spyOnEvent('ionAlertDidPresent');
const ionAlertDidDismiss = await page.spyOnEvent('ionAlertDidDismiss');
const alert = page.locator('ion-alert');

await alert.evaluate((el: HTMLIonAlertElement) => el.present());
await ionAlertDidPresent.next();

await alert.locator('.alert-button').press('Enter');
await ionAlertDidDismiss.next();

await expect(alert).toBeHidden();
});
});
});

/**
* This behavior does not vary across directions
*/
Expand Down
4 changes: 2 additions & 2 deletions core/src/components/datetime/datetime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2316,8 +2316,7 @@ export class Datetime implements ComponentInterface {
const prevMonthDisabled = disabled || isPrevMonthDisabled(this.workingParts, this.minParts, this.maxParts);
const nextMonthDisabled = disabled || isNextMonthDisabled(this.workingParts, this.maxParts);

// don't use the inheritAttributes util because it removes dir from the host, and we still need that
const hostDir = this.el.getAttribute('dir') || undefined;
const hostDir = isRTL(this.el) ? 'rtl' : 'ltr';

return (
<div class="calendar-header" part="calendar-header">
Expand All @@ -2338,6 +2337,7 @@ export class Datetime implements ComponentInterface {
{getMonthAndYear(this.locale, this.workingParts)}
{theme !== 'ionic' && (
<ion-icon
dir={hostDir}
aria-hidden="true"
icon={this.showMonthAndYear ? datetimeExpandedIcon : datetimeCollapsedIcon}
lazy={false}
Expand Down
Loading
Loading