Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/modal/__tests__/modal.browser-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ describe('SLDSModal: ', function () {
modal = getModalNode(document.body);
});

it('adds the default h1 heading element', () => {
const header = modal.querySelector('section .slds-modal__header h1');
expect(header).to.not.be.null;
});

it('adds the footer', () => {
const footer = modal.querySelector('.slds-modal__footer');
expect(footer.className).to.include('slds-theme_default');
Expand Down
4 changes: 2 additions & 2 deletions components/modal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,15 +449,15 @@ class Modal extends React.Component {
headerContent = (
<div>
{this.props.toast}
<h2
<h1
className={classNames({
'slds-text-heading_small': this.isPrompt(),
'slds-text-heading_medium': !this.isPrompt(),
})}
id={`${this.getId()}-heading`}
>
{this.props.heading ? this.props.heading : this.props.title}
</h2>
</h1>
{this.props.tagline ? (
<p className="slds-m-top_x-small">{this.props.tagline}</p>
) : null}
Expand Down