Skip to content

Commit d934e24

Browse files
committed
run ai wrapper script
1 parent 17b2607 commit d934e24

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

packages/ai/src/components/Button/index.tsx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,35 @@
22

33
import '@ui5/webcomponents-ai/dist/Button.js';
44
import type ButtonDesign from '@ui5/webcomponents/dist/types/ButtonDesign.js';
5+
import type { AIButtonAccessibilityAttributes } from '@ui5/webcomponents-ai/dist/Button.js';
56
import { withWebComponent } from '@ui5/webcomponents-react-base';
67
import type { CommonProps, Ui5CustomEvent, Ui5DomRef } from '@ui5/webcomponents-react-base';
78
import type { ReactNode } from 'react';
89

910
interface ButtonAttributes {
11+
/**
12+
* Defines the additional accessibility attributes that will be applied to the component.
13+
*
14+
* This property allows for fine-tuned control of ARIA attributes for screen reader support.
15+
* It accepts an object with the following optional fields:
16+
*
17+
* - **root**: Accessibility attributes that will be applied to the root element.
18+
* - **hasPopup**: Indicates the availability and type of interactive popup element (such as a menu or dialog).
19+
* Accepts string values: `"dialog"`, `"grid"`, `"listbox"`, `"menu"`, or `"tree"`.
20+
* - **roleDescription**: Defines a human-readable description for the button's role.
21+
* Accepts any string value.
22+
*
23+
* - **arrowButton**: Accessibility attributes that will be applied to the arrow (split) button element.
24+
* - **hasPopup**: Indicates the type of popup triggered by the arrow button.
25+
* Accepts string values: `"dialog"`, `"grid"`, `"listbox"`, `"menu"`, or `"tree"`.
26+
* - **expanded**: Indicates whether the popup controlled by the arrow button is currently expanded.
27+
* Accepts boolean values: `true` or `false`.
28+
*
29+
* **Note:** Available since [v2.6.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.6.0) of **@ui5/webcomponents-ai**.
30+
* @default {}
31+
*/
32+
accessibilityAttributes?: AIButtonAccessibilityAttributes;
33+
1034
/**
1135
* Defines the active state of the arrow button in split mode.
1236
* Set to true when the button is in split mode and a menu with additional options
@@ -97,7 +121,7 @@ interface ButtonPropTypes
97121
*/
98122
const Button = withWebComponent<ButtonPropTypes, ButtonDomRef>(
99123
'ui5-ai-button',
100-
['design', 'state'],
124+
['accessibilityAttributes', 'design', 'state'],
101125
['arrowButtonPressed', 'disabled'],
102126
[],
103127
['arrow-button-click', 'click'],

0 commit comments

Comments
 (0)