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
2 changes: 1 addition & 1 deletion .github/workflows/actions/build-angular/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 'Build Ionic Angular'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v7
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.x
- uses: ./.github/workflows/actions/download-archive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actions/download-archive/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
runs:
using: 'composite'
steps:
- uses: actions/download-artifact@v8
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ runs:
working-directory: ./core
- name: 📦 Archive Updated Screenshots
if: inputs.update == 'true' && steps.test-and-update.outputs.hasUpdatedScreenshots == 'true'
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: updated-screenshots-${{ inputs.shard }}-${{ inputs.totalShards }}
path: UpdatedScreenshots-${{ inputs.shard }}-${{ inputs.totalShards }}.zip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ runs:
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.x
- uses: actions/download-artifact@v8
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: ./artifacts
- name: 🔎 Extract Archives
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actions/upload-archive/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runs:
- name: 🗄️ Create Archive
run: zip -q -r ${{ inputs.output }} ${{ inputs.paths }}
shell: bash
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ inputs.name }}
path: ${{ inputs.output }}
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
security-events: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: github/codeql-action/init@v4
- uses: github/codeql-action/init@7188fc363630916deb702c7fdcf4e481b751f97a # v4.37.1
with:
languages: javascript
- uses: github/codeql-action/analyze@v4
- uses: github/codeql-action/analyze@7188fc363630916deb702c7fdcf4e481b751f97a # v4.37.1
2 changes: 1 addition & 1 deletion .github/workflows/conventional-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: |
!contains(github.event.pull_request.title, 'release') &&
!contains(github.event.pull_request.title, 'chore')
uses: amannn/action-semantic-pull-request@v6
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v6
- uses: actions/labeler@b8dd2d9be0f68b860e7dae5dae7d772984eacd6d # v6.2.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.8.15](https://github.com/ionic-team/ionic-framework/compare/v8.8.14...v8.8.15) (2026-07-22)


### Bug Fixes

* **angular-server:** fallback to scoped+annotations when SSR DOM lacks attachShadow ([#30967](https://github.com/ionic-team/ionic-framework/issues/30967)) ([ae6911f](https://github.com/ionic-team/ionic-framework/commit/ae6911f6c8d46467ae54114295688bbba5ccbf5e)), closes [#29751](https://github.com/ionic-team/ionic-framework/issues/29751)
* **modal:** focus the dialog wrapper on present so screen readers can enter the modal ([#31260](https://github.com/ionic-team/ionic-framework/issues/31260)) ([6251eb8](https://github.com/ionic-team/ionic-framework/commit/6251eb85db0e5b43b9e09604248dc8451e1664c0))





## [8.8.14](https://github.com/ionic-team/ionic-framework/compare/v8.8.13...v8.8.14) (2026-07-15)


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

## [8.8.15](https://github.com/ionic-team/ionic-framework/compare/v8.8.14...v8.8.15) (2026-07-22)


### Bug Fixes

* **modal:** focus the dialog wrapper on present so screen readers can enter the modal ([#31260](https://github.com/ionic-team/ionic-framework/issues/31260)) ([6251eb8](https://github.com/ionic-team/ionic-framework/commit/6251eb85db0e5b43b9e09604248dc8451e1664c0))





## [8.8.14](https://github.com/ionic-team/ionic-framework/compare/v8.8.13...v8.8.14) (2026-07-15)

**Note:** Version bump only for package @ionic/core
Expand Down
10 changes: 5 additions & 5 deletions core/package-lock.json

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

2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "8.8.14",
"version": "8.8.15",
"description": "Base components for Ionic",
"engines": {
"node": ">= 16"
Expand Down
7 changes: 7 additions & 0 deletions core/src/components/modal/gestures/sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,13 @@ export const createSheetGesture = (
};

const onStart = (detail: GestureDetail) => {
/**
* Firefox automatically selects the header text during drag
* due to the focusable wrapper (tabindex="-1"). Remove any
* selection that may have occurred.
*/
window.getSelection()?.removeAllRanges();

/**
* If canDismiss is anything other than `true`
* then users should be able to swipe down
Expand Down
7 changes: 7 additions & 0 deletions core/src/components/modal/gestures/swipe-to-close.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ export const createSwipeToCloseGesture = (
const onStart = (detail: GestureDetail) => {
const { deltaY } = detail;

/**
* Firefox automatically selects the header text during drag
* due to the focusable wrapper (tabindex="-1"). Remove any
* selection that may have occurred.
*/
window.getSelection()?.removeAllRanges();

/**
* Get the initial scrollY value so
* that we can correctly reset the scrollY
Expand Down
8 changes: 8 additions & 0 deletions core/src/components/modal/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ ion-backdrop {
z-index: 10;
}

/**
* The wrapper receives programmatic focus for screen readers but should not
* show a visible focus ring, which is meant only for keyboard navigation.
*/
.modal-wrapper {
outline: none;
}

.modal-shadow {
position: absolute;

Expand Down
7 changes: 7 additions & 0 deletions core/src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1644,10 +1644,17 @@ export class Modal implements ComponentInterface, OverlayInterface {
same element. They must also be set inside the
shadow DOM otherwise ion-button will not be highlighted
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
tabIndex={-1} is required so present() can move focus to this
element (which carries the dialog role) instead of the role-less
host. role="dialog" alone does not make an element focusable, so
without the tabindex focus() would be a no-op and screen readers
may not properly announce the dialog and its content when it opens.
*/
role="dialog"
{...inheritedAttributes}
aria-modal="true"
tabIndex={-1}
class="modal-wrapper ion-overlay-wrapper"
part="content"
ref={(el) => (this.wrapperEl = el)}
Expand Down
17 changes: 17 additions & 0 deletions core/src/components/modal/test/a11y/modal.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,22 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
const results = await new AxeBuilder({ page }).analyze();
expect(results.violations).toEqual([]);
});

// The focused wrapper must not show a focus ring when opened via keyboard.
test('should not render a focus ring on the wrapper when presented via keyboard', async ({ page }) => {
await page.goto(`/src/components/modal/test/a11y`, config);

const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
const button = page.locator('#open-modal');
const wrapper = page.locator('ion-modal .modal-wrapper');

// Open with the keyboard so :focus-visible applies to the wrapper.
await button.focus();
await page.keyboard.press('Enter');
await ionModalDidPresent.next();

await expect(wrapper).toBeFocused();
await expect(wrapper).toHaveCSS('outline-style', 'none');
});
});
});
24 changes: 23 additions & 1 deletion core/src/utils/overlays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,29 @@ export const present = async <OverlayPresentOptions>(
* to the overlay container.
*/
if (overlay.keyboardClose && (document.activeElement === null || !overlay.el.contains(document.activeElement))) {
overlay.el.focus();
/**
* Some overlays (e.g. modal) put the dialog role and accessible label
* on the `.ion-overlay-wrapper` instead of the host. Screen readers
* need focus on the element with `role="dialog"` to properly announce
* and navigate the dialog.
*
* We only target wrappers with `tabindex`, since `role="dialog"` alone
* does not make an element focusable. If no focusable dialog wrapper
* exists (e.g. picker-legacy), we fall back to the host.
*/
const overlayWrapper = getElementRoot(overlay.el).querySelector<HTMLElement>('[role="dialog"][tabindex]');
const focusTarget = overlayWrapper ?? overlay.el;
/**
* `preventScroll` keeps this a pure focus move so the viewport does not
* jump when the wrapper is partially off-screen (e.g. a sheet modal).
* Guard the options call so an older engine that mishandles it can never
* reject present(); we fall back to a plain focus() in that case.
*/
try {
focusTarget.focus({ preventScroll: true });
} catch {
focusTarget.focus();
}
}

/**
Expand Down
82 changes: 82 additions & 0 deletions core/src/utils/test/overlays/overlays.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,5 +421,87 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
// verify focus is in correct location
await expect(input).toBeFocused();
});

// Focus the role="dialog" wrapper on present so screen readers can enter.
test('should focus the modal wrapper on present', async ({ page }, testInfo) => {
testInfo.annotations.push({
type: 'issue',
description: 'FW-7611',
});
await page.setContent(
`
<ion-modal>
<ion-content>Modal Content</ion-content>
</ion-modal>
`,
config
);

const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
const modal = page.locator('ion-modal');
const wrapper = page.locator('ion-modal .modal-wrapper');

await modal.evaluate((el: HTMLIonModalElement) => el.present());
await ionModalDidPresent.next();

await expect(wrapper).toHaveAttribute('role', 'dialog');
await expect(wrapper).toBeFocused();
});

test('should focus the sheet modal wrapper on present', async ({ page }, testInfo) => {
testInfo.annotations.push({
type: 'issue',
description: 'FW-7611',
});
await page.setContent(
`
<ion-modal initial-breakpoint="0.5" breakpoints="[0, 0.5, 1]">
<ion-content>Sheet Modal Content</ion-content>
</ion-modal>
`,
config
);

const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
const modal = page.locator('ion-modal');
const wrapper = page.locator('ion-modal .modal-wrapper');

await modal.evaluate((el: HTMLIonModalElement) => el.present());
await ionModalDidPresent.next();

await expect(wrapper).toHaveAttribute('role', 'dialog');
await expect(wrapper).toBeFocused();
});

test('should focus the card modal wrapper on present', async ({ page }, testInfo) => {
testInfo.annotations.push({
type: 'issue',
description: 'FW-7611',
});
await page.setContent(
`
<div class="ion-page">
<ion-content>Root Content</ion-content>
</div>
<ion-modal>
<ion-content>Card Modal Content</ion-content>
</ion-modal>
`,
config
);

const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
const modal = page.locator('ion-modal');
const wrapper = page.locator('ion-modal .modal-wrapper');

await modal.evaluate((el: HTMLIonModalElement) => {
el.presentingElement = document.querySelector<HTMLElement>('.ion-page')!;
return el.present();
});
await ionModalDidPresent.next();

await expect(wrapper).toHaveAttribute('role', 'dialog');
await expect(wrapper).toBeFocused();
});
});
});
6 changes: 6 additions & 0 deletions core/src/utils/test/playwright/drag-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ export const dragElementBy = async (

await page.mouse.down();

// Firefox treats focusable elements (tabindex="-1") as draggable text and
// initiates text selection on mouse.down(). In Playwright, this selection
// locks in before the gesture detector fires, blocking pointer events.
// Clearing it here allows the drag gesture to proceed normally.
await page.evaluate(() => window.getSelection()?.removeAllRanges());

// Drag the element.
await moveElement(page, startX, startY, dragByX, dragByY);

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"core",
"packages/*"
],
"version": "8.8.14"
"version": "8.8.15"
}
11 changes: 11 additions & 0 deletions packages/angular-server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.8.15](https://github.com/ionic-team/ionic-framework/compare/v8.8.14...v8.8.15) (2026-07-22)


### Bug Fixes

* **angular-server:** fallback to scoped+annotations when SSR DOM lacks attachShadow ([#30967](https://github.com/ionic-team/ionic-framework/issues/30967)) ([ae6911f](https://github.com/ionic-team/ionic-framework/commit/ae6911f6c8d46467ae54114295688bbba5ccbf5e)), closes [#29751](https://github.com/ionic-team/ionic-framework/issues/29751)





## [8.8.14](https://github.com/ionic-team/ionic-framework/compare/v8.8.13...v8.8.14) (2026-07-15)

**Note:** Version bump only for package @ionic/angular-server
Expand Down
Loading
Loading