Closed lormanlau closed 2 years ago
Hello @SAP/ui5-webcomponents-topic-rd,
This is a request for a public API related to the ui5-dialog component, in order to set role to the dialog popover element other than the default one.
By the given example it could be role="alertdialog"
instead of the hardcoded role="dialog"
.
https://developer.mozilla.org/en-US/docs/web/accessibility/aria/roles/alertdialog_role
Could you please evaluate this possibility?
Best Regards, Boyan Rakilovski
Hello @lormanlau,
Could you please provide more information what you are trying to achieve? In UI5 the dialog can be "alertdialog" or "dialog", depending on the type.
But the role="alert" is only used in the MessageToast as it behaves as live region. And this is not applicable to the dialogs in general.
Thanks, Nikolay
Hi @nikolay-kolarov,
We are trying to use the dialog as an warning message for the user. I believe "alertdialog" exactly what we needed to achieve this.
Thanks, Lorman
It turns the right solution is to extend the Dialog with a state property - which will determine the right Aria attributes, not only for Alert, but also for other state-Dialogs. Corresponding backlog item BGSOFUIRODOPI-2838 is created, but it will take about a few weeks to implement it
This issue is addressed with the following pull request https://github.com/SAP/ui5-webcomponents/pull/5587
Feature Request Description
A clear and concise description of what feature is missing. Is your feature request related to a problem? Please describe.
Currently the role for the ui5 dialog is hard coded for role of the section to be dialog https://github.com/SAP/ui5-webcomponents/blob/ddc1e3909e624aa1643e424284ec1144e8b81bb9/packages/main/src/Popup.hbs#L4 We would like this to be changeable to alertdialog when using the dialog as an alert popup.
Proposed Solution
A clear and concise description of the solution you would like to have. Adding a parameter for the ui5 webcomponent dialog to apply and role necessary.
Proposed Alternatives
A clear and concise description of any alternative solutions or features you've considered. Only allowing a few roles to be available to the dialog.
Additional Context
Add other context or screenshots related to the feature request here. N/A
Priority
A clear and concise description of the impact/urgency of the required feature.
Stakeholder Info (if applicable)