openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

[sap.m.MessageStrip] Feature Request: Simplify announcement of message strips

Open swendlandt opened this issue 1 year ago • 1 comments

OpenUI5 version: 1.123

Currently the official way to announce a dynamically generated MessageStrip for Screen Reader users is to call sap.ui.core.InvisibleMessage, see https://ui5.sap.com/#/api/sap.m.MessageStrip%23overview and the example https://ui5.sap.com/#/entity/sap.m.MessageStrip/sample/sap.m.sample.DynamicMessageStripGenerator/code.

Idea to make this easier for the user of the MessageStrip control:

Add a live property to the MessageStrip, e.g. when we add a MessageStrip we could do:

oMsgStrip = new MessageStrip("msgStrip", {
    live: true
});

Let’s say when the “live”-property is set on the MessageStrip and the MessageStrip detects that it becomes visible (I guess this can be done in onAfterRendering hook or in setVisible, not sure what would be the best place), then the MessageStrip can internally call the InvisibleMessage and add the announcement.

So technically it is the same as it is currently but instead of requiring the application to set the message the functionality would be encapsulated in the control. Of course, the consuming application would still need to set the property but it would be visible as part of the official API reference then. If a user of the control would not want to have the standard announcement, they still can leave the property false and implement the announcement themselves using the InvisibleMessage API directly.

swendlandt avatar Apr 25 '24 09:04 swendlandt

Hi @swendlandt ,

I have contached the responsible team and they told me that this feature request is already evaluated and communicated and they have given their opinions why they don't want to do it.

So feel free to contribute to the project with the feature you want.

Best Regards, Nikolay Hristov UI5 GitHub Dispatcher

NHristov-sap avatar Apr 26 '24 13:04 NHristov-sap