SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.95k stars 1.24k forks source link

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

Closed swendlandt closed 4 months ago

swendlandt commented 5 months ago

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.

NHristov-sap commented 5 months ago

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