Skip to content

Commit b0379d7

Browse files
Merge branch 'main' into fix/combo-box-ai-label-close-icon
2 parents 4b242d6 + 9ec6285 commit b0379d7

File tree

37 files changed

+487
-440
lines changed

37 files changed

+487
-440
lines changed

.percy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ snapshot:
88
discovery:
99
allowed-hostnames:
1010
- 1.www.s81c.com
11+
network-idle-timeout: 1000

config/eslint-config-carbon/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "eslint-config-carbon",
33
"description": "ESLint configuration for Carbon",
4-
"version": "3.18.0",
4+
"version": "3.19.0-rc.0",
55
"license": "Apache-2.0",
66
"main": "index.js",
77
"repository": {

e2e/test-utils/snapshot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async function snapshot(page, context) {
2626
* This configuration overrides any global setting for `widths` in .percy.yml or otherwise.
2727
* See https://github.com/carbon-design-system/carbon/issues/14779
2828
*/
29-
const widths = context.themes === 'white' ? [1366, 360] : [1366];
29+
const widths = context.theme === 'white' ? [1366, 360] : [1366];
3030

3131
if (process.env.ENABLE_LOCAL_SNAPSHOTS) {
3232
expect(await page.screenshot()).toMatchSnapshot(`${id}.png`);

examples/class-prefix/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "class-prefix",
33
"private": true,
4-
"version": "0.71.0",
4+
"version": "0.72.0-rc.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "vite build",
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@carbon/react": "^1.74.0",
12+
"@carbon/react": "^1.75.0-rc.0",
1313
"react": "^18.2.0",
1414
"react-dom": "^18.2.0"
1515
},
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "codesandbox-styles",
33
"private": true,
4-
"version": "0.76.0",
4+
"version": "0.77.0-rc.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite"
@@ -11,6 +11,6 @@
1111
"vite": "^4.3.8"
1212
},
1313
"dependencies": {
14-
"@carbon/styles": "^1.73.0"
14+
"@carbon/styles": "^1.74.0-rc.0"
1515
}
1616
}

examples/custom-theme/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "custom-theme",
33
"private": true,
4-
"version": "0.72.0",
4+
"version": "0.73.0-rc.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "vite build",
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@carbon/react": "^1.74.0",
12+
"@carbon/react": "^1.75.0-rc.0",
1313
"react": "^18.2.0",
1414
"react-dom": "^18.2.0"
1515
},

examples/id-prefix/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "id-prefix",
33
"private": true,
4-
"version": "0.71.0",
4+
"version": "0.72.0-rc.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "vite build",
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@carbon/react": "^1.74.0",
12+
"@carbon/react": "^1.75.0-rc.0",
1313
"react": "^18.2.0",
1414
"react-dom": "^18.2.0"
1515
},

examples/light-dark-mode/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "examples-light-dark",
33
"private": true,
4-
"version": "0.72.0",
4+
"version": "0.73.0-rc.0",
55
"scripts": {
66
"build": "next build",
77
"dev": "next dev",
88
"lint": "next lint",
99
"start": "next start"
1010
},
1111
"dependencies": {
12-
"@carbon/react": "^1.74.0",
12+
"@carbon/react": "^1.75.0-rc.0",
1313
"next": "14.1.1",
1414
"react": "18.2.0",
1515
"react-dom": "18.2.0"

examples/nextjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "examples-nextjs",
33
"private": true,
4-
"version": "0.74.0",
4+
"version": "0.75.0-rc.0",
55
"scripts": {
66
"build": "next build",
77
"dev": "next dev",
88
"lint": "next lint",
99
"start": "next start"
1010
},
1111
"dependencies": {
12-
"@carbon/react": "^1.74.0",
12+
"@carbon/react": "^1.75.0-rc.0",
1313
"next": "14.1.1",
1414
"react": "18.2.0",
1515
"react-dom": "18.2.0"

examples/v10-token-compat-in-v11/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "v10-token-compat-in-v11",
33
"private": true,
4-
"version": "0.72.0",
4+
"version": "0.73.0-rc.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "vite build",
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@carbon/react": "^1.74.0",
12+
"@carbon/react": "^1.75.0-rc.0",
1313
"react": "^18.2.0",
1414
"react-dom": "^18.2.0"
1515
},

examples/vite/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "vite",
33
"private": true,
4-
"version": "0.72.0",
4+
"version": "0.73.0-rc.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "vite build",
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@carbon/react": "^1.74.0",
12+
"@carbon/react": "^1.75.0-rc.0",
1313
"react": "^18.2.0",
1414
"react-dom": "^18.2.0"
1515
},

packages/carbon-components-react/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "carbon-components-react",
33
"private": true,
44
"description": "The Carbon Design System is IBM’s open-source design system for products and experiences. This package reached end of support on September 30, 2024 and will not receive any more updates.",
5-
"version": "8.74.0",
5+
"version": "8.75.0-rc.0",
66
"license": "Apache-2.0",
77
"main": "lib/index.js",
88
"module": "es/index.js",
@@ -43,8 +43,8 @@
4343
"sass": "^1.33.0"
4444
},
4545
"dependencies": {
46-
"@carbon/react": "^1.74.0",
47-
"@carbon/styles": "^1.73.0",
46+
"@carbon/react": "^1.75.0-rc.0",
47+
"@carbon/styles": "^1.74.0-rc.0",
4848
"@ibm/telemetry-js": "^1.5.0",
4949
"chalk": "1.1.3"
5050
},

packages/carbon-components/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "carbon-components",
33
"private": true,
44
"description": "The Carbon Design System is IBM’s open-source design system for products and experiences. This package reached end of support on September 30, 2024 and will not receive any more updates.",
5-
"version": "11.73.0",
5+
"version": "11.74.0-rc.0",
66
"license": "Apache-2.0",
77
"repository": {
88
"type": "git",
@@ -44,7 +44,7 @@
4444
"sass": "^1.33.0"
4545
},
4646
"dependencies": {
47-
"@carbon/styles": "^1.73.0",
47+
"@carbon/styles": "^1.74.0-rc.0",
4848
"@ibm/telemetry-js": "^1.5.0",
4949
"chalk": "1.1.3"
5050
},

packages/elements/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@carbon/elements",
33
"description": "A collection of design elements in code for the IBM Design Language",
4-
"version": "11.59.0",
4+
"version": "11.60.0-rc.0",
55
"license": "Apache-2.0",
66
"main": "lib/index.js",
77
"module": "es/index.js",
@@ -40,7 +40,7 @@
4040
"dependencies": {
4141
"@carbon/colors": "^11.28.0",
4242
"@carbon/grid": "^11.30.0",
43-
"@carbon/icons": "^11.53.0",
43+
"@carbon/icons": "^11.54.0-rc.0",
4444
"@carbon/layout": "^11.28.0",
4545
"@carbon/motion": "^11.24.0",
4646
"@carbon/themes": "^11.45.0",

packages/icons-react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@carbon/icons-react",
33
"description": "React components for icons in digital and software products using the Carbon Design System",
4-
"version": "11.53.0",
4+
"version": "11.54.0-rc.0",
55
"license": "Apache-2.0",
66
"main": "lib/index.js",
77
"module": "es/index.js",
@@ -44,7 +44,7 @@
4444
},
4545
"devDependencies": {
4646
"@carbon/icon-build-helpers": "^1.32.0",
47-
"@carbon/icons": "^11.53.0",
47+
"@carbon/icons": "^11.54.0-rc.0",
4848
"rimraf": "^6.0.0"
4949
},
5050
"sideEffects": false

packages/icons-vue/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@carbon/icons-vue",
33
"description": "Vue components for icons in digital and software products using the Carbon Design System",
4-
"version": "10.102.0",
4+
"version": "10.103.0-rc.0",
55
"license": "Apache-2.0",
66
"main": "lib/index.js",
77
"module": "es/index.js",
@@ -35,7 +35,7 @@
3535
},
3636
"devDependencies": {
3737
"@carbon/cli-reporter": "^10.7.0",
38-
"@carbon/icons": "^11.53.0",
38+
"@carbon/icons": "^11.54.0-rc.0",
3939
"fs-extra": "^11.0.0",
4040
"prettier": "^3.3.3",
4141
"rimraf": "^6.0.0",

packages/icons/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@carbon/icons",
33
"description": "Icons for digital and software products using the Carbon Design System",
4-
"version": "11.53.0",
4+
"version": "11.54.0-rc.0",
55
"license": "Apache-2.0",
66
"main": "lib/index.js",
77
"module": "es/index.js",

packages/react/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@carbon/react",
33
"description": "React components for the Carbon Design System",
4-
"version": "1.74.0",
4+
"version": "1.75.0-rc.0",
55
"license": "Apache-2.0",
66
"main": "lib/index.js",
77
"types": "lib/index.d.ts",
@@ -51,9 +51,9 @@
5151
"dependencies": {
5252
"@babel/runtime": "^7.24.7",
5353
"@carbon/feature-flags": "^0.24.0",
54-
"@carbon/icons-react": "^11.53.0",
54+
"@carbon/icons-react": "^11.54.0-rc.0",
5555
"@carbon/layout": "^11.28.0",
56-
"@carbon/styles": "^1.73.0",
56+
"@carbon/styles": "^1.74.0-rc.0",
5757
"@floating-ui/react": "^0.26.0",
5858
"@ibm/telemetry-js": "^1.5.0",
5959
"classnames": "2.5.1",

packages/react/src/components/AILabel/__tests__/AILabel-test.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,25 @@ describe('AILabelActions', () => {
157157

158158
expect(screen.getByText('View details')).toBeInTheDocument();
159159
});
160+
describe('Labels and kind prop', () => {
161+
it('should use empty label for inline kind', () => {
162+
render(<AILabel kind="inline" aiText="AI" textLabel="Text goes here" />);
163+
expect(screen.getByRole('button')).toHaveAttribute('aria-label', '');
164+
});
165+
166+
it('should set aria-label when kind is default', () => {
167+
render(<AILabel aiText="AI" />);
168+
expect(screen.getByRole('button')).toHaveAttribute(
169+
'aria-label',
170+
'AI Show information'
171+
);
172+
});
173+
174+
it('should let visible text serve as accessible name in inline mode', () => {
175+
render(<AILabel kind="inline" aiText="AI" textLabel="Text goes here" />);
176+
expect(
177+
screen.getByRole('button', { name: 'AI Text goes here' })
178+
).toBeInTheDocument();
179+
});
180+
});
160181
});

packages/react/src/components/AILabel/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export const AILabel = React.forwardRef<HTMLDivElement, AILabelProps>(
214214
{...rest}>
215215
<ToggletipButton
216216
className={aiLabelButtonClasses}
217-
label={ariaLabelText}>
217+
label={kind === 'inline' ? '' : ariaLabelText}>
218218
<span className={`${prefix}--ai-label__text`}>{aiText}</span>
219219
{kind === 'inline' && (aiTextLabel || textLabel) && (
220220
<span className={`${prefix}--ai-label__additional-text`}>

0 commit comments

Comments
 (0)