Skip to content

Commit

Permalink
[Discover] Better a11y for page header (#129789)
Browse files Browse the repository at this point in the history
  • Loading branch information
drewdaemon authored Apr 11, 2022
1 parent b5dae38 commit 6542dc1
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.pageTitleWithoutSavedSearch', {
defaultMessage: 'Discover - Search not yet saved',
})}
</h1>
<EuiFlexGroup className="dscPageBody__contents" gutterSize="none">
<EuiFlexItem grow={false}>
Expand Down

0 comments on commit 6542dc1

Please sign in to comment.