Skip to content

Commit 3c6555a

Browse files
authored
merge release-8.5.8 (#30437)
v8.5.8
2 parents a8cbad0 + b587ccd commit 3c6555a

34 files changed

+245
-113
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
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.8](https://github.com/ionic-team/ionic-framework/compare/v8.5.7...v8.5.8) (2025-05-28)
7+
8+
9+
### Bug Fixes
10+
11+
* **input-password-toggle, button:** force update aria attributes ([#30411](https://github.com/ionic-team/ionic-framework/issues/30411)) ([4e38700](https://github.com/ionic-team/ionic-framework/commit/4e387005663b4e8425cb28e41608bb4f924b3864))
12+
13+
14+
15+
16+
617
## [8.5.7](https://github.com/ionic-team/ionic-framework/compare/v8.5.6...v8.5.7) (2025-05-07)
718

819

core/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
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.8](https://github.com/ionic-team/ionic-framework/compare/v8.5.7...v8.5.8) (2025-05-28)
7+
8+
9+
### Bug Fixes
10+
11+
* **input-password-toggle, button:** force update aria attributes ([#30411](https://github.com/ionic-team/ionic-framework/issues/30411)) ([4e38700](https://github.com/ionic-team/ionic-framework/commit/4e387005663b4e8425cb28e41608bb4f924b3864))
12+
13+
14+
15+
16+
617
## [8.5.7](https://github.com/ionic-team/ionic-framework/compare/v8.5.6...v8.5.7) (2025-05-07)
718

819

core/package-lock.json

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

core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ionic/core",
3-
"version": "8.5.7",
3+
"version": "8.5.8",
44
"description": "Base components for Ionic",
55
"keywords": [
66
"ionic",
@@ -41,7 +41,7 @@
4141
"@capacitor/haptics": "^7.0.0",
4242
"@capacitor/keyboard": "^7.0.0",
4343
"@capacitor/status-bar": "^7.0.0",
44-
"@clack/prompts": "^0.10.0",
44+
"@clack/prompts": "^0.11.0",
4545
"@ionic/eslint-config": "^0.3.0",
4646
"@ionic/prettier-config": "^2.0.0",
4747
"@playwright/test": "^1.52.0",

core/src/components.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2612,7 +2612,7 @@ export namespace Components {
26122612
*/
26132613
"cancelButtonIcon": string;
26142614
/**
2615-
* Set the the cancel button text. Only applies to `ios` mode.
2615+
* Set the cancel button text. Only applies to `ios` mode.
26162616
*/
26172617
"cancelButtonText": string;
26182618
/**
@@ -7443,7 +7443,7 @@ declare namespace LocalJSX {
74437443
*/
74447444
"cancelButtonIcon"?: string;
74457445
/**
7446-
* Set the the cancel button text. Only applies to `ios` mode.
7446+
* Set the cancel button text. Only applies to `ios` mode.
74477447
*/
74487448
"cancelButtonText"?: string;
74497449
/**

core/src/components/button/button.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ComponentInterface, EventEmitter } from '@stencil/core';
2-
import { Component, Element, Event, Host, Prop, Watch, State, h } from '@stencil/core';
2+
import { Component, Element, Event, Host, Prop, Watch, State, forceUpdate, h } from '@stencil/core';
33
import type { AnchorInterface, ButtonInterface } from '@utils/element-interface';
44
import type { Attributes } from '@utils/helpers';
55
import { inheritAriaAttributes, hasShadowDom } from '@utils/helpers';
@@ -158,6 +158,26 @@ export class Button implements ComponentInterface, AnchorInterface, ButtonInterf
158158
*/
159159
@Event() ionBlur!: EventEmitter<void>;
160160

161+
/**
162+
* This component is used within the `ion-input-password-toggle` component
163+
* to toggle the visibility of the password input.
164+
* These attributes need to update based on the state of the password input.
165+
* Otherwise, the values will be stale.
166+
*
167+
* @param newValue
168+
* @param _oldValue
169+
* @param propName
170+
*/
171+
@Watch('aria-checked')
172+
@Watch('aria-label')
173+
onAriaChanged(newValue: string, _oldValue: string, propName: string) {
174+
this.inheritedAttributes = {
175+
...this.inheritedAttributes,
176+
[propName]: newValue,
177+
};
178+
forceUpdate(this);
179+
}
180+
161181
/**
162182
* This is responsible for rendering a hidden native
163183
* button element inside the associated form. This allows

core/src/components/input-password-toggle/input-password-toggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class InputPasswordToggle implements ComponentInterface {
127127
fill="clear"
128128
shape="round"
129129
aria-checked={isPasswordVisible ? 'true' : 'false'}
130-
aria-label="show password"
130+
aria-label={isPasswordVisible ? 'Hide password' : 'Show password'}
131131
role="switch"
132132
type="button"
133133
onPointerDown={(ev) => {

core/src/components/input-password-toggle/test/a11y/input-password-toggle.e2e.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,38 @@ configs({ directions: ['ltr'] }).forEach(({ title, config }) => {
2020
expect(results.violations).toEqual([]);
2121
});
2222
});
23+
24+
test.describe(title('input password toggle: aria attributes'), () => {
25+
test('should inherit aria attributes to inner button on load', async ({ page }) => {
26+
await page.setContent(
27+
`
28+
<ion-input label="input" type="password">
29+
<ion-input-password-toggle slot="end"></ion-input-password-toggle>
30+
</ion-input>
31+
`,
32+
config
33+
);
34+
35+
const nativeButton = page.locator('ion-input-password-toggle button');
36+
37+
await expect(nativeButton).toHaveAttribute('aria-label', 'Show password');
38+
await expect(nativeButton).toHaveAttribute('aria-checked', 'false');
39+
});
40+
test('should inherit aria attributes to inner button after toggle', async ({ page }) => {
41+
await page.setContent(
42+
`
43+
<ion-input label="input" type="password">
44+
<ion-input-password-toggle slot="end"></ion-input-password-toggle>
45+
</ion-input>
46+
`,
47+
config
48+
);
49+
50+
const nativeButton = page.locator('ion-input-password-toggle button');
51+
await nativeButton.click();
52+
53+
await expect(nativeButton).toHaveAttribute('aria-label', 'Hide password');
54+
await expect(nativeButton).toHaveAttribute('aria-checked', 'true');
55+
});
56+
});
2357
});

core/src/components/picker-legacy-column/picker-column.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export class PickerColumnCmp implements ComponentInterface {
386386
const colEl = this.optsEl;
387387
if (colEl) {
388388
// DOM READ
389-
// We perfom a DOM read over a rendered item, this needs to happen after the first render or after the the column has changed
389+
// We perfom a DOM read over a rendered item, this needs to happen after the first render or after the column has changed
390390
this.optHeight = colEl.firstElementChild ? colEl.firstElementChild.clientHeight : 0;
391391
}
392392
this.refresh(forceRefresh, animated);

core/src/components/searchbar/searchbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class Searchbar implements ComponentInterface {
101101
@Prop() cancelButtonIcon = config.get('backButtonIcon', arrowBackSharp) as string;
102102

103103
/**
104-
* Set the the cancel button text. Only applies to `ios` mode.
104+
* Set the cancel button text. Only applies to `ios` mode.
105105
*/
106106
@Prop() cancelButtonText = 'Cancel';
107107

0 commit comments

Comments
 (0)