Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

feat(Dialog): add component #790

Merged
merged 8 commits into from
Jan 31, 2019
Merged

feat(Dialog): add component #790

merged 8 commits into from
Jan 31, 2019

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Jan 29, 2019

This PR implements basic Dialog component.

@layershifter layershifter changed the title [WIP] feat(Dialog): add component feat(Dialog): add component Jan 29, 2019
@layershifter layershifter added the ⚙️ enhancement New feature or request label Jan 30, 2019
{...accessibility.keyHandlers.popup}
{...unhandledProps}
>
{Box.create(header, {
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced with Header, fda25b7

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created an issue for arias, #812

@layershifter layershifter merged commit ef4fc21 into master Jan 31, 2019
@layershifter layershifter deleted the feat/dialog branch January 31, 2019 13:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants