Currently, we offer the following configuration options for the Dialog title and header:
- title: a mandatory prop, since we need to label the dialog per the ARIA APG spec
- hideTitle: a boolean prop that can be set to true to visually hide the title in the header.
- closeButtonLabel: a string prop for the visually-hidden label for the close button. If empty, the close button will not display
- If hideTitle is true and no closeButtonLabel is provided, the entire dialog header will be hidden
There are a couple of issues with this:
- The last bullet point is not well-explained in the docs, and whether the close button or the entire header should display is not explicit. We should reconsider this workflow and see if we can make it clearer.
- If the header is hidden, the title is not included anywhere. It should be included as an aria-label when the header is not included.
Acceptance criteria
- Discuss a better workflow for whether the dialog header should be displayed
- Include an aria-label when the header is not displayed