fix(ui5-split-button): announce accessible name before instructions - #13901
fix(ui5-split-button): announce accessible name before instructions#13901Todor-ads wants to merge 3 commits into
Conversation
|
🚀 Deployed on https://pr-13901--ui5-webcomponents-preview.netlify.app |
There was a problem hiding this comment.
The custom role "Split Button" is not getting announced in JAWS. With NVDA it gets announced at the end and it should be announced after the accessible name announcement (the same as in openui5 split button).
In order to fix this custom role announcement inconsistency we should move the "Split Button" text from aria-roldescription attribute to the aria-label attribute instead (placing the custom role text directly after the accessible name).
| return { | ||
| root: { | ||
| hasPopup: this.accessibilityAttributes?.root?.hasPopup, | ||
| roleDescription: this.accessibilityAttributes?.root?.roleDescription || (this._hideArrowButton ? undefined : SplitButton.i18nBundle.getText(SPLIT_BUTTON_DESCRIPTION)), |
There was a problem hiding this comment.
Т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.
9e86420 to
ae867ef
Compare
Screen readers were announcing the keyboard usage instructions before the accessible name of the button, because keyboardHint was placed before accessibleName in the invisibleText span.
The fix swaps their order so the accessible name is announced immediately after the button label, followed by the instructions.
Fixes: #13841