acl-services / paprika

🌶 A robust + accessible UI component library for React applications by Galvanize.
MIT License
54 stars 9 forks source link

Support changing role for Modal #355

Open DanilAgafonov opened 4 years ago

DanilAgafonov commented 4 years ago

Feature request

Prerequisites

We have Modal component. Currently, Modal component renders <div role="dialog">.

Is your feature request related to a problem?

role="dialog" is not best solution for some cases.

Describe the solution you'd like

There is alertdialog role – a special-case dialog role designed specifically for dialogs that divert users' attention to a brief, important message.

Additional context

https://github.com/acl-services/paprika/pull/320#discussion_r357880537

https://www.w3.org/TR/wai-aria-practices-1.1/examples/dialog-modal/alertdialog.html

oscarkwan commented 2 years ago

@DanilAgafonov Following up on this to see if this is still needed. In terms of an alertdialog role, would that be a better use case for the <Toast> component instead of the <Modal>?