Skip to content
Open
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
5 changes: 1 addition & 4 deletions packages/main/src/SplitButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import SplitButtonTemplate from "./SplitButtonTemplate.js";
// Styles
import SplitButtonCss from "./generated/themes/SplitButton.css.js";

type SplitButtonRootAccAttributes = Pick<AccessibilityAttributes, "hasPopup" | "roleDescription" | "title" | "ariaKeyShortcuts">;
type SplitButtonRootAccAttributes = Pick<AccessibilityAttributes, "hasPopup" | "title" | "ariaKeyShortcuts">;
type SplitButtonArrowButtonAccAtributes = Pick<AccessibilityAttributes, "hasPopup" | "expanded" | "title">;
type SplitButtonAccessibilityAttributes = {root?: SplitButtonRootAccAttributes, arrowButton?: SplitButtonArrowButtonAccAtributes}

Expand Down Expand Up @@ -224,8 +224,6 @@ class SplitButton extends UI5Element {
* - **root**: Attributes that will be applied to the main (text) button.
* - **hasPopup**: Indicates the presence and type of popup triggered by the button.
* Accepts string values: `"dialog"`, `"grid"`, `"listbox"`, `"menu"`, or `"tree"`.
* - **roleDescription**: Provides a human-readable description for the role of the button.
* Accepts any string value.
* - **title**: Specifies a tooltip or description for screen readers.
* Accepts any string value.
* - **ariaKeyShortcuts**: Defines keyboard shortcuts that activate or give focus to the button.
Expand Down Expand Up @@ -469,7 +467,6 @@ class SplitButton extends UI5Element {
return {
root: {
hasPopup: this.accessibilityAttributes?.root?.hasPopup,
roleDescription: this.accessibilityAttributes?.root?.roleDescription || (this._hideArrowButton ? undefined : SplitButton.i18nBundle.getText(SPLIT_BUTTON_DESCRIPTION)),

@unazko unazko Aug 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тhe issue is already fixed, but I would also remove the aria-roledescription attribute from the SplitButtonTemplate for the group element now as aria-roledescription is not announced by JAWS. We've placed the role description text in the aria-labelledby attribute.

title: this.accessibilityAttributes?.root?.title,
ariaKeyShortcuts: this.accessibilityAttributes?.root?.ariaKeyShortcuts,
},
Expand Down
5 changes: 2 additions & 3 deletions packages/main/src/SplitButtonTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
tabindex={this._tabIndex}
aria-labelledby={!this._hideArrowButton ? `${this._id}-invisibleTextDefault ${this._id}-invisibleText` : undefined}
aria-haspopup={this._computedAccessibilityAttributes?.root?.hasPopup}
aria-roledescription={this._computedAccessibilityAttributes?.root?.roleDescription}
aria-label={this._computedAccessibilityAttributes?.root?.title}
aria-label={this._computedAccessibilityAttributes?.root?.title}

Check failure on line 13 in packages/main/src/SplitButtonTemplate.tsx

View workflow job for this annotation

GitHub Actions / check

Expected indentation of 3 tabs but found 0
aria-keyshortcuts={this._computedAccessibilityAttributes?.root?.ariaKeyShortcuts}
onFocusOut={this._onFocusOut}
onKeyDown={this._onKeyDown}
Expand Down Expand Up @@ -56,7 +55,7 @@
onActiveStateChange={this._onArrowButtonActiveStateChange}
>
</Button>
<span id={`${this._id}-invisibleText`} class="ui5-hidden-text">{this.accInfo.keyboardHint} {this.accessibleName}</span>
<span id={`${this._id}-invisibleText`} class="ui5-hidden-text">{this.accessibleName} {this.accInfo.description} {this.accInfo.keyboardHint}</span>
<span id={`${this._id}-invisibleTextDefault`} class="ui5-hidden-text">{this.buttonTextContent}</span>
</>
)}
Expand Down
Loading