-
Notifications
You must be signed in to change notification settings - Fork 55
Conversation
dea49fc
to
00b4024
Compare
src/components/Dialog/Dialog.tsx
Outdated
{...accessibility.keyHandlers.popup} | ||
{...unhandledProps} | ||
> | ||
{Box.create(header, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the Header
component here? By default we should render H2: https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html
Also, would it be possible to allow adding aria-labelledby (which needs an ID reference to the header)?
The logic should be:
- by default, generate aria-labelledby
- if aria-labelledby provided by the user, use that instead
- if aria-label provided, do not generate aria-labelledby
For aria-describedby I would leave it fully on the consumer to provide correct referecne as not all dialogs have clear description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with Header
, fda25b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created an issue for aria
s, #812
…ust-ui/react into feat/dialog # Conflicts: # CHANGELOG.md
…ust-ui/react into feat/dialog # Conflicts: # CHANGELOG.md
This PR implements basic Dialog component.