Skip to content

Commit 70680ed

Browse files
WT874,875 - fix a11y violations (fix #1330) (#1338)
* WT874,875 - fix a11y violations (fix #1330) * address review feedback * remove duplicate id * remove duplicate classes * move fl-main class away from main * fix failing python test --------- Co-authored-by: Kasey Kelly <kasey@servee.com>
1 parent 1cc5349 commit 70680ed

46 files changed

Lines changed: 147 additions & 88 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

media/css/cms/components/flare26-navigation.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,12 @@
162162
}
163163

164164
.fl-menu-title,
165-
.fl-menu-title h2,
165+
.fl-menu-title .fl-menu-heading {
166+
line-height: unset;
167+
}
168+
169+
.fl-menu-title,
170+
.fl-menu-title .fl-menu-heading,
166171
.fl-menu-subtitle {
167172
color: var(--fl-theme-color-text);
168173
font-family: var(--fl-theme-font-family-body);
@@ -436,7 +441,7 @@
436441
}
437442

438443
.fl-menu-title,
439-
.fl-menu-title h2,
444+
.fl-menu-title .fl-menu-heading,
440445
.fl-menu-subtitle {
441446
font-size: var(--fl-theme-font-size-body-sm);
442447
}
@@ -470,15 +475,15 @@
470475
pointer-events: auto;
471476
}
472477

473-
.fl-menu-category h2::after {
478+
.fl-menu-category .fl-menu-heading::after {
474479
display: inline-block;
475480
}
476481

477482
.fl-menu-title {
478483
color: var(--fl-menu-title-color);
479484
}
480485

481-
.fl-menu-title h2 {
486+
.fl-menu-title .fl-menu-heading {
482487
font-weight: var(--token-font-weight-regular);
483488
margin: 0;
484489
padding: 0 var(--token-spacing-sm);

springfield/cms/templates/cms/article_detail_page.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99

1010
{% block body_class %}fl-article-body {% if not switch("flare26_enabled") %}disable-dark-mode{% endif %}{% endblock %}
1111

12+
{% block main_class %}{% endblock %}
13+
1214
{% block content %}
1315
<div class="fl-page fl-article-page">
14-
<main class="fl-main">
16+
<div class="fl-main">
1517
<div class="fl-article-main">
1618
<header class="fl-article-header">
1719
<include:heading
@@ -79,7 +81,7 @@
7981
{% include_block block %}
8082
{% endfor %}
8183
{% endif %}
82-
</main>
84+
</div>
8385
{% if not switch("flare26_enabled") %}
8486
{% set value = get_download_firefox_cta_snippet() %}
8587
{% if value %}

springfield/cms/templates/cms/article_index_page.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
<include:flare26-header theme="dark"/>
1212
{% endblock %}
1313

14+
{% block main_class %}{% endblock %}
15+
1416
{% block content %}
1517
<div class="fl-page">
16-
<main class="fl-main has-gradient-bottom">
18+
<div class="fl-main has-gradient-bottom">
1719
<div class="fl-split-page-upper has-gradient-bottom">
1820

1921
<section class="fl-section">
@@ -354,7 +356,7 @@ <h3 class="fl-heading fl-heading-size-3">
354356
</div>
355357
</section>
356358
</div>
357-
</main>
359+
</div>
358360
</div>
359361
{% endblock %}
360362

springfield/cms/templates/cms/article_theme_page.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
<include:flare26-header theme="{{ header_theme }}" />
1414
{% endblock %}
1515

16+
{% block main_class %}{% endblock %}
17+
1618
{% block content %}
1719
<div class="fl-page fl-features-theme-page">
1820
{% if page.upper_content|length %}
19-
<main class="fl-main">
21+
<div class="fl-main">
2022
{% set ns = namespace(headings=0) %}
2123
{% set block_level = 1 %}
2224

@@ -50,9 +52,9 @@
5052
{% include_block block %}
5153
{% endfor %}
5254
</div>
53-
</main>
55+
</div>
5456
{% else %}
55-
<main class="fl-main has-gradient-bottom">
57+
<div class="fl-main has-gradient-bottom">
5658
{% set ns = namespace(headings=0) %}
5759
{% for block in page.content %}
5860
{% set block_index = loop.index %}
@@ -66,7 +68,7 @@
6668

6769
{% include_block block %}
6870
{% endfor %}
69-
</main>
71+
</div>
7072
{% endif %}
7173
</div>
7274
{% endblock %}

springfield/cms/templates/cms/base-flare26.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,11 @@
109109
{% block sub_navigation %}
110110
{% endblock %}
111111

112+
<main class="{% block main_class %}fl26-content{% endblock %}"{% block main_attrs %}{% endblock %}>
112113
{% block content %}
113-
<main class="fl26-content">
114114
<div class="fl26-content-inner">
115115
<h1>{{ page.title if page is defined and page.title is defined else 'Firefox' }}</h1>
116116
</div>
117-
</main>
118117
{% endblock %}
119118

120119
{% block pre_footer %}
@@ -152,6 +151,7 @@ <h1>{{ page.title if page is defined and page.title is defined else 'Firefox' }}
152151
{% endif %}
153152

154153
{% endblock pre_footer %}
154+
</main>
155155

156156
{% block flare_footer %}
157157
<include:flare26-footer />

springfield/cms/templates/cms/base-pattern.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@
2222
</div>
2323
{% endblock %}
2424

25+
{% block pre_footer %}{% endblock %}
26+
2527
{% block flare_footer %}{% endblock %}

springfield/cms/templates/cms/blocks/download-support.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{% if ftl_has_messages('firefox-desktop-download-if-you-see-a-prompt', 'firefox-desktop-download-visit-support-for-more') %}
1818
<include:conditional-display platform_conditions="{{ ['windows-10-plus'] }}">
1919
<div class="fl-notification-wrapper">
20-
<aside class="fl-notification fl-notification-stacked">
20+
<div class="fl-notification fl-notification-stacked">
2121
<div class="fl-notification-icon-section">
2222

2323
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="35" class="fl-windows-disclaimer-logo">
@@ -33,7 +33,7 @@
3333
<p>{{ ftl('firefox-desktop-download-if-you-see-a-prompt', attrs='href="https://support.mozilla.org/kb/windows-10-warns-me-use-microsoft-verified-app%s" rel="external noopener" data-cta-text="Get help with your installation"'|safe|format(params)) }}</p>
3434
<p><a href="https://support.mozilla.org/kb/windows-10-warns-me-use-microsoft-verified-app{{ params }}" rel="external noopener" data-cta-text="Visit Support for More Details">{{ ftl('firefox-desktop-download-visit-support-for-more') }}</a></p>
3535
</div>
36-
</aside>
36+
</div>
3737
</div>
3838
</include:conditional-display>
3939
{% endif %}

springfield/cms/templates/cms/download_page.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
<include:flare26-header theme="dark" />
1717
{% endblock %}
1818

19+
{% block main_class %}{% endblock %}
20+
1921
{% block content %}
2022
<div class="fl-page">
21-
<main class="fl-main">
23+
<div class="fl-main">
2224
<section class="fl-split-page-upper has-gradient-bottom fl-download-intro">
2325
<h1 class="fl-heading fl-heading-size-1">
2426
{% if LANG.startswith('en-') %}
@@ -144,7 +146,7 @@ <h1 class="fl-heading fl-heading-size-1">
144146
{% include_block block %}
145147
{% endfor %}
146148
</section>
147-
</main>
149+
</div>
148150
</div>
149151
{% endblock %}
150152

springfield/cms/templates/cms/free_form_page2026.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
<include:flare26-header theme="{{ theme }}" hide_nav_cta="{{ hide_nav_cta }}" no_menu="{{ no_menu }}" />
1515
{% endblock %}
1616

17+
{% block main_class %}{% endblock %}
18+
1719
{% block content %}
1820
<div class="fl-page fl-freeform-2026-page">
1921
{% if page.upper_content %}
20-
<main class="fl-main has-gradient-bottom">
22+
<div class="fl-main has-gradient-bottom">
2123
{% set ns = namespace(headings=0) %}
2224
{% set block_level = 1 %}
2325

@@ -52,9 +54,9 @@
5254
{% endfor %}
5355
</div>
5456
{% endif %}
55-
</main>
57+
</div>
5658
{% else %}
57-
<main class="fl-main has-gradient-bottom">
59+
<div class="fl-main has-gradient-bottom">
5860
{% set ns = namespace(headings=0) %}
5961
{% for block in page.content %}
6062
{% set block_index = loop.index %}
@@ -68,7 +70,7 @@
6870

6971
{% include_block block %}
7072
{% endfor %}
71-
</main>
73+
</div>
7274
{% endif %}
7375
</div>
7476
{% endblock %}

springfield/cms/templates/cms/home_page.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
<include:flare26-header theme="dark" />
1515
{% endblock %}
1616

17+
{% block main_class %}{% endblock %}
18+
1719
{% block content %}
1820
<div class="fl-page">
19-
<main class="fl-main">
21+
<div class="fl-main">
2022
<div class="fl-split-page-upper">
2123
{% set ns = namespace(headings=0) %}
2224
{% set block_level = 1 %}
@@ -48,6 +50,6 @@
4850
{% include_block block %}
4951
{% endfor %}
5052
</div>
51-
</main>
53+
</div>
5254
</div>
5355
{% endblock %}

0 commit comments

Comments
 (0)