Skip to content

Commit e383514

Browse files
authored
UX: banner headline should not be an H1 (#98)
1 parent 68629b4 commit e383514

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

common/common.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@
6060
}
6161
}
6262

63-
h1 {
63+
.custom-search-banner-headline {
64+
font-family: var(--heading-font-family);
65+
font-size: var(--font-up-5);
66+
font-weight: bold;
67+
margin-bottom: 0.5rem;
6468
text-align: center;
6569
}
6670

javascripts/discourse/components/search-banner.gjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ export default class SearchBanner extends Component {
8888
{{willDestroy this.willDestroy}}
8989
>
9090
<div class="wrap custom-search-banner-wrap welcome-banner__wrap">
91-
<h1>{{htmlSafe (i18n (themePrefix "search_banner.headline"))}}</h1>
91+
<div class="custom-search-banner-headline">
92+
{{htmlSafe (i18n (themePrefix "search_banner.headline"))}}
93+
</div>
9294
<PluginOutlet @name="search-banner-below-headline" />
9395
<p>{{htmlSafe (i18n (themePrefix "search_banner.subhead"))}}</p>
9496
<div class="search-menu welcome-banner__search-menu">

stylesheets/special-styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
width: auto;
3737
}
3838

39-
> h1,
39+
> .custom-search-banner-headline,
4040
> p {
4141
display: none;
4242
}

test/acceptance/search-banner-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ acceptance("Discourse Advanced Search Banner", function (needs) {
2525
assert.dom(".custom-search-banner .results").exists();
2626

2727
// select a element to simulate clicking outside the search banner
28-
await click(".custom-search-banner h1");
28+
await click(".custom-search-banner .custom-search-banner-headline");
2929
assert.dom(".custom-search-banner .results").doesNotExist();
3030
});
3131

0 commit comments

Comments
 (0)