SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.51k stars 262 forks source link

[SF_ACC][Feature Request]: Enable configure the accessible name of custom panel header icon button #7578

Closed ksblklu closed 1 year ago

ksblklu commented 1 year ago

Feature Request Description

Hi team When we have several panel with custom header on page, we expected unique accessible name for each panel header icon button. Currently the accessible name of panel header icon button is defined internally, hence we want to change each icon button's accessible name via panel property.

Proposed Solution

Enable changing the accessible name of custom panel header icon button

image

Proposed Alternatives

No response

Organization

SuccessFactors

Additional Context

No response

Priority

Medium

Privacy Policy

NHristov-sap commented 1 year ago

Hello @SAP/ui5-webcomponents-topic-rl,

Please take a look of this feature request.

Best Regards, Nikolay Hristov

elenastoyanovaa commented 1 year ago

Hello @ksblklu ,

You can use a private boolean property called "useAccessibleNameForToggleButton", which is available in the ui5-panel. It works as follows. You first set the accessibleName of the ui5-panel. Then set the private property as well.

The reason why it is private is that because when you set it, this would result in repetitive speech output, when you focus with TAB on the button. This is actually expected, because you enter a new region (the panel region) and therefore the title of the panel is read out (the string value of the accessibleName of ui5-panel) + the region role. Then the information about the focused element (in your case the button) will be read as well.

Kind Regards, Elena