Skip to content

Commit 69db209

Browse files
Merge branch 'feature-8.5' into ROU-11554
2 parents cb10db6 + 335672d commit 69db209

File tree

69 files changed

+181
-64
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+181
-64
lines changed

.github/workflows/assign-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
- name: 'Auto-assign issue'
1414
uses: pozil/auto-assign-issue@39c06395cbac76e79afc4ad4e5c5c6db6ecfdd2e # v2.2.0
1515
with:
16-
assignees: brandyscarney, thetaPC, joselrio, rugoncalves, BenOsodrac, JoaoFerreira-FrontEnd, OS-giulianasilva, tanner-reits
16+
assignees: brandyscarney, thetaPC, ShaneK
1717
numOfAssignee: 1
1818
allowSelfAssign: false

core/package-lock.json

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

core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
},
3838
"devDependencies": {
3939
"@axe-core/playwright": "^4.10.0",
40-
"@capacitor/core": "^6.0.0",
41-
"@capacitor/haptics": "^6.0.0",
42-
"@capacitor/keyboard": "^6.0.0",
43-
"@capacitor/status-bar": "^6.0.0",
40+
"@capacitor/core": "^7.0.0",
41+
"@capacitor/haptics": "^7.0.0",
42+
"@capacitor/keyboard": "^7.0.0",
43+
"@capacitor/status-bar": "^7.0.0",
4444
"@clack/prompts": "^0.10.0",
4545
"@ionic/eslint-config": "^0.3.0",
4646
"@ionic/prettier-config": "^2.0.0",

core/src/components.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,7 +1736,7 @@ export namespace Components {
17361736
*/
17371737
"enterAnimation"?: AnimationBuilder;
17381738
/**
1739-
* Controls whether scrolling or dragging within the sheet modal expands it to a larger breakpoint. This only takes effect when `breakpoints` and `initialBreakpoint` are set. If `true`, scrolling or dragging anywhere in the modal will first expand it to the next breakpoint. Once fully expanded, scrolling will affect the content. If `false`, scrolling will always affect the content, and the modal will only expand when dragging the header or handle.
1739+
* Controls whether scrolling or dragging within the sheet modal expands it to a larger breakpoint. This only takes effect when `breakpoints` and `initialBreakpoint` are set. If `true`, scrolling or dragging anywhere in the modal will first expand it to the next breakpoint. Once fully expanded, scrolling will affect the content. If `false`, scrolling will always affect the content. The modal will only expand when dragging the header or handle. The modal will close when dragging the header or handle. It can also be closed when dragging the content, but only if the content is scrolled to the top.
17401740
*/
17411741
"expandToScroll": boolean;
17421742
/**
@@ -6561,7 +6561,7 @@ declare namespace LocalJSX {
65616561
*/
65626562
"enterAnimation"?: AnimationBuilder;
65636563
/**
6564-
* Controls whether scrolling or dragging within the sheet modal expands it to a larger breakpoint. This only takes effect when `breakpoints` and `initialBreakpoint` are set. If `true`, scrolling or dragging anywhere in the modal will first expand it to the next breakpoint. Once fully expanded, scrolling will affect the content. If `false`, scrolling will always affect the content, and the modal will only expand when dragging the header or handle.
6564+
* Controls whether scrolling or dragging within the sheet modal expands it to a larger breakpoint. This only takes effect when `breakpoints` and `initialBreakpoint` are set. If `true`, scrolling or dragging anywhere in the modal will first expand it to the next breakpoint. Once fully expanded, scrolling will affect the content. If `false`, scrolling will always affect the content. The modal will only expand when dragging the header or handle. The modal will close when dragging the header or handle. It can also be closed when dragging the content, but only if the content is scrolled to the top.
65656565
*/
65666566
"expandToScroll"?: boolean;
65676567
/**

core/src/components/alert/alert.tsx

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,18 @@ export class Alert implements ComponentInterface, OverlayInterface {
237237
return;
238238
}
239239

240+
/**
241+
* 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.
242+
*/
243+
if (ev.target.classList.contains('alert-wrapper')) {
244+
if (ev.key === 'Tab' && ev.shiftKey) {
245+
ev.preventDefault();
246+
const lastChildBtn = this.wrapperEl?.querySelector('.alert-button:last-child') as HTMLButtonElement;
247+
lastChildBtn.focus();
248+
return;
249+
}
250+
}
251+
240252
// The only inputs we want to navigate between using arrow keys are the radios
241253
// ignore the keydown event if it is not on a radio button
242254
if (
@@ -400,7 +412,19 @@ export class Alert implements ComponentInterface, OverlayInterface {
400412

401413
await this.delegateController.attachViewToDom();
402414

403-
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);
415+
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation).then(() => {
416+
/**
417+
* Check if alert has only one button and no inputs.
418+
* If so, then focus on the button. Otherwise, focus the alert wrapper.
419+
* This will map to the default native alert behavior.
420+
*/
421+
if (this.buttons.length === 1 && this.inputs.length === 0) {
422+
const queryBtn = this.wrapperEl?.querySelector('.alert-button') as HTMLButtonElement;
423+
queryBtn.focus();
424+
} else {
425+
this.wrapperEl?.focus();
426+
}
427+
});
404428

405429
unlock();
406430
}
@@ -725,8 +749,8 @@ export class Alert implements ComponentInterface, OverlayInterface {
725749
const { overlayIndex, header, subHeader, message, htmlAttributes } = this;
726750
const mode = getIonMode(this);
727751
const hdrId = `alert-${overlayIndex}-hdr`;
728-
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
729752
const msgId = `alert-${overlayIndex}-msg`;
753+
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
730754
const role = this.inputs.length > 0 || this.buttons.length > 0 ? 'alertdialog' : 'alert';
731755

732756
/**
@@ -739,12 +763,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
739763

740764
return (
741765
<Host
742-
role={role}
743-
aria-modal="true"
744-
aria-labelledby={ariaLabelledBy}
745-
aria-describedby={message !== undefined ? msgId : null}
746766
tabindex="-1"
747-
{...(htmlAttributes as any)}
748767
style={{
749768
zIndex: `${20000 + overlayIndex}`,
750769
}}
@@ -761,7 +780,16 @@ export class Alert implements ComponentInterface, OverlayInterface {
761780

762781
<div tabindex="0" aria-hidden="true"></div>
763782

764-
<div class="alert-wrapper ion-overlay-wrapper" ref={(el) => (this.wrapperEl = el)}>
783+
<div
784+
class="alert-wrapper ion-overlay-wrapper"
785+
role={role}
786+
aria-modal="true"
787+
aria-labelledby={ariaLabelledBy}
788+
aria-describedby={message !== undefined ? msgId : null}
789+
tabindex="0"
790+
ref={(el) => (this.wrapperEl = el)}
791+
{...(htmlAttributes as any)}
792+
>
765793
<div class="alert-head">
766794
{header && (
767795
<h2 id={hdrId} class="alert-title">

core/src/components/alert/test/a11y/alert.e2e.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const testAria = async (
1616
await didPresent.next();
1717

1818
const alert = page.locator('ion-alert');
19+
const alertwrapper = alert.locator('.alert-wrapper');
1920

2021
const header = alert.locator('.alert-title');
2122
const subHeader = alert.locator('.alert-sub-title');
@@ -42,8 +43,8 @@ const testAria = async (
4243
* expect().toHaveAttribute() can't check for a null value, so grab and check
4344
* the values manually instead.
4445
*/
45-
const ariaLabelledBy = await alert.getAttribute('aria-labelledby');
46-
const ariaDescribedBy = await alert.getAttribute('aria-describedby');
46+
const ariaLabelledBy = await alertwrapper.getAttribute('aria-labelledby');
47+
const ariaDescribedBy = await alertwrapper.getAttribute('aria-describedby');
4748

4849
expect(ariaLabelledBy).toBe(expectedAriaLabelledBy);
4950
expect(ariaDescribedBy).toBe(expectedAriaDescribedBy);
-1.88 KB
3.15 KB
1.57 KB
-2.52 KB

0 commit comments

Comments
 (0)