Skip to content

A platform for community discussion. Free, open, simple.

A11Y: use proper heading structure for about page (#38807)

Kris8b45fa331692
diff --git a/app/assets/stylesheets/common/base/about.scss b/app/assets/stylesheets/common/base/about.scss
index 694713ca814..4f37311606c 100644
--- a/app/assets/stylesheets/common/base/about.scss
+++ b/app/assets/stylesheets/common/base/about.scss
@@ -7,11 +7,15 @@
gap: 2em;
max-width: 1100px;
+ h2 {
+ font-size: var(--font-up-1);
+ }
+
.--custom-group {
max-width: unset;
margin-top: 3em;
- h3 {
+ h2 {
a {
color: var(--primary);
@@ -40,6 +44,10 @@
&__header {
max-width: 1100px;
+
+ h1 {
+ font-size: var(--font-up-1);
+ }
}
&__left-side {
@@ -113,7 +121,7 @@
&__moderators {
margin-top: 3em;
- h3 {
+ h2 {
margin-bottom: 1em;
}
}
diff --git a/frontend/discourse/app/components/about-page.gjs b/frontend/discourse/app/components/about-page.gjs
index 7533481e712..83e4f337b13 100644
--- a/frontend/discourse/app/components/about-page.gjs
+++ b/frontend/discourse/app/components/about-page.gjs
@@ -251,7 +251,7 @@ export default class AboutPage extends Component {
<img class="about__banner-img" src={{@model.banner_image}} />
</div>
{{/if}}
- <h3>{{@model.title}}</h3>
+ <h1>{{@model.title}}</h1>
<p class="short-description">{{@model.description}}</p>
<PluginOutlet
@name="about-after-description"
@@ -273,13 +273,13 @@ export default class AboutPage extends Component {
</div>
{{#if @model.extended_site_description}}
- <h3>{{i18n "about.simple_title"}}</h3>
+ <h2>{{i18n "about.simple_title"}}</h2>
<div>{{trustHTML @model.extended_site_description}}</div>
{{/if}}
{{#if @model.admins.length}}
<section class="about__admins">
- <h3>{{i18n "about.our_admins"}}</h3>
+ <h2>{{i18n "about.our_admins"}}</h2>
<AboutPageUsers @users={{@model.admins}} @truncateAt={{6}} />
</section>
{{/if}}
@@ -291,7 +291,7 @@ export default class AboutPage extends Component {
{{#if @model.moderators.length}}
<section class="about__moderators">
- <h3>{{i18n "about.our_moderators"}}</h3>
+ <h2>{{i18n "about.our_moderators"}}</h2>
<AboutPageUsers @users={{@model.moderators}} @truncateAt={{6}} />
</section>
{{/if}}
@@ -306,12 +306,12 @@ export default class AboutPage extends Component {
</div>
<div class="about__right-side">
- <h3>{{i18n "about.contact"}}</h3>
+ <h2>{{i18n "about.contact"}}</h2>
{{#if this.contactInfo}}
<p class="about__contact-info">{{trustHTML this.contactInfo}}</p>
{{/if}}
<p>{{i18n "about.report_inappropriate_content"}}</p>
- <h3>{{i18n "about.site_activity"}}</h3>
+ <h2>{{i18n "about.site_activity"}}</h2>
<div class="about__activities">
{{#each this.siteActivities as |activity|}}
<div class="about__activities-item {{activity.class}}">
diff --git a/spec/system/page_objects/pages/about.rb b/spec/system/page_objects/pages/about.rb
index 9176132ca93..3a2a5a85d16 100644
--- a/spec/system/page_objects/pages/about.rb
+++ b/spec/system/page_objects/pages/about.rb
@@ -8,7 +8,7 @@ module PageObjects
end
def has_header_title?(title)
- has_css?(".about__header h3", text: title)
+ has_css?(".about__header h1", text: title)
end
def has_short_description?(content)