Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix <Modal> component so it is possible to use the aria.labelledby prop #29020

Merged
merged 2 commits into from Feb 19, 2021
Merged

Fix <Modal> component so it is possible to use the aria.labelledby prop #29020

merged 2 commits into from Feb 19, 2021

Commits on Feb 16, 2021

  1. Set the modal's aria-labelledby attribute if provided as a prop

    Fixes a bug where <Modal> wasn't forwarding the `aria.labelledby` prop to
    <ModalFrame> if the `title` prop was missing. However the purpose of
    `labelledby` is to allow modals to provide their own title element, in
    which case they won't want to use the `title` prop.
    
    The `aria.labelledby` prop is now correctly forwarded to <ModalFrame> if
    no title is provided. The `title` prop will take precedent over
    `aria.labelledby`.
    p-jackson committed Feb 16, 2021
    Copy the full SHA
    6d45ae7 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2021

  1. Update <Modal> docs

    Make it clearer that while a title is required, it can be provided be
    either the `title`, `aria.labelledby` or `contentLabel` props.
    p-jackson committed Feb 18, 2021
    Copy the full SHA
    e04e293 View commit details
    Browse the repository at this point in the history