Skip to content

Commit

Permalink
Better a11y titles
Browse files Browse the repository at this point in the history
  • Loading branch information
drewdaemon committed Apr 7, 2022
1 parent 9f305da commit 69a209e
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,16 @@ export function DiscoverLayout({
history={history}
/>
<h1 id="savedSearchTitle" className="euiScreenReaderOnly">
{savedSearch.title}
{savedSearch.title
? i18n.translate('discover.pageTitleWithSavedSearch', {
defaultMessage: 'Discover - {savedSearchTitle}',
values: {
savedSearchTitle: savedSearch.title,
},
})
: i18n.translate('discover.pageTitleWithSavedSearch', {
defaultMessage: 'Discover - Search not yet saved',
})}
</h1>
<EuiFlexGroup className="dscPageBody__contents" gutterSize="none">
<EuiFlexItem grow={false}>
Expand Down

0 comments on commit 69a209e

Please sign in to comment.