Skip to content

Commit 98e74a5

Browse files
authored
Merge pull request #2160 from barrymcgee/improve-accessibility
Fix accessibility issues on homepage and individual article pages
2 parents 1f635f3 + 19fc4b2 commit 98e74a5

14 files changed

Lines changed: 46 additions & 42 deletions

includes/article.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<main class="container-xl px-3 px-md-6 my-4 my-lg-4 d-xl-flex">
1+
<div class="container-xl px-3 px-md-6 my-4 my-lg-4 d-xl-flex">
22
<article class="markdown-body width-full">
33
<div class="d-lg-flex flex-justify-between">
44
<div class="d-block d-lg-none">{% include article-version-switcher %}</div>
@@ -48,7 +48,7 @@ <h1 class="border-bottom-0">{{ page.title }}</h1>
4848
<div class="article-grid-toc border-bottom border-xl-0 pb-4 mb-5 pb-xl-0 mb-xl-0">
4949
<div class="article-grid-toc-content">
5050
{% if miniTocItems.size > 1 %}
51-
<h3 id="in-this-article" class="f5 mb-2"><a class="link-gray-dark" href="#in-this-article">{% data ui.pages.miniToc %}</a></h3>
51+
<h2 id="in-this-article" class="f5 mb-2"><a class="link-gray-dark" href="#in-this-article">{% data ui.pages.miniToc %}</a></h2>
5252
<ul class="list-style-none pl-0 f5 mb-0">
5353
{% for item in miniTocItems %}
5454
<li class="ml-{{ item.indentationLevel | times: 3 }} {{ item.platform }} mb-2 lh-condensed">{{ item.contents }}</li>
@@ -70,4 +70,4 @@ <h3 id="in-this-article" class="f5 mb-2"><a class="link-gray-dark" href="#in-thi
7070
{% unless page.hidden %}{% include contribution %}{% endunless %}
7171
</div>
7272
</article>
73-
</main>
73+
</div>

includes/contribution.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{% unless enterpriseServerReleases.isOldestReleaseDeprecated and currentVersion contains enterpriseServerReleases.oldestSupported %}
22
<div class="mt-3 f5 contribution">
3-
<h4>{% data ui.contribution_cta.title %}</h4>
3+
<h2 class="f5">{% data ui.contribution_cta.title %}</h2>
44
<p class="text-gray f6">{% data ui.contribution_cta.body %}</p>
55
<a class="btn btn-outline" href={{ "https://github.com/github/docs/edit/main/content/" | append: page.relativePath }}>
66
{% octicon "git-pull-request" height="16" %}
77
{% data ui.contribution_cta.button %}
88
</a>
99
<p class="text-gray f6 mt-2">{% data ui.contribution_cta.or %} <a href="https://github.com/github/docs/blob/main/CONTRIBUTING.md" target="_blank">{% data ui.contribution_cta.to_guidelines %}</a></p>
1010
</div>
11-
{% endunless %}
11+
{% endunless %}

includes/header.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
<header class="container-xl px-3 px-md-6 pt-3 pb-2 position-relative d-flex flex-justify-between width-full {% if error == '404' %} d-md-none {% endif %}">
77

8-
<div class="d-flex flex-items-center d-lg-none" style="z-index: 3;" id="github-logo-mobile">
9-
<a href="/{{ currentLanguage }}" aria-hidden="true">
8+
<div class="d-flex flex-items-center d-lg-none" style="z-index: 3;" id="github-logo-mobile" role="banner">
9+
<a href="/{{ currentLanguage }}" aria-hidden="true" tabindex="-1">
1010
{% octicon "mark-github" height="32" class="text-black" %}
1111
</a>
1212
<a href="/{{ currentLanguage }}" class="h4-mktg text-gray-dark no-underline no-wrap pl-2">{% data ui.header.github_docs %}</a>

includes/helpfulness.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{% unless enterpriseServerReleases.isOldestReleaseDeprecated and currentVersion contains enterpriseServerReleases.oldestSupported %}
22
<form class="js-helpfulness mt-4 f5">
3-
<h4
3+
<h2
44
data-help-start
55
data-help-yes
66
data-help-no
7-
class="mb-1"
7+
class="mb-1 f5"
88
>
99
{% data ui.helpfulness.able_to_find %}
10-
</h4>
10+
</h2>
1111
<p class="f6">
1212
<a href="/github/site-policy/github-privacy-statement">Privacy policy</a>
1313
</p>

includes/landing.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h1 class="h1-mktg mb-3">{% data ui.search.need_help %}</h1>
1717
<!-- Explore by product -->
1818
<section class="container-xl pb-lg-4 my-8 px-3 px-md-6">
1919
<div class="">
20-
<h3 class="text-mono f5 text-normal text-gray text-md-center mb-4">{% data ui.homepage.explore_by_product %}</h3>
20+
<h2 class="text-mono f5 text-normal text-gray text-md-center mb-4">{% data ui.homepage.explore_by_product %}</h2>
2121
<div class="d-flex flex-wrap gutter gutter-xl-spacious">
2222
{% for product in activeProducts %}
2323
{% if product.versions contains currentVersion or currentVersion == 'homepage' %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<a class="link-with-intro Bump-link--hover no-underline" href="{{ fullPath }}">
2-
<h4 class="link-with-intro-title">{{ title }}<span class="Bump-link-symbol"></span></h4>
2+
<h2 class="link-with-intro-title f4">{{ title }}<span class="Bump-link-symbol"></span></h2>
33
</a>
44
{% if intro %}<p class="link-with-intro-intro">{{ intro }}</p>{% endif %}

includes/search-form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
- On all other pages, in the header
66
-->
77

8-
<form class="mb-0">
9-
<div id="search-input-container" aria-hidden="true">
8+
<form class="mb-0" aria-hidden="true">
9+
<div id="search-input-container">
1010
<!-- Algolia instantsearch.js will add a search input here -->
1111
</div>
1212
</form>

includes/sidebar-specific-product.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<a href="{{product.href}}" class="pl-4 pr-5 pb-1 f4">{{ product.title }}</a>
1414
{% endunless %}
1515
</li>
16+
<li>
1617
<ul class="sidebar-categories list-style-none">
1718
{% for category in product.categories %}
1819
{% capture fullPathToCategory %}{{category[1].href}}{% endcapture %}
@@ -74,3 +75,4 @@
7475
</li>
7576
{% endfor %}
7677
</ul>
78+
</li>

includes/sidebar.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<!-- product > category > maptopic > article -->
22
<div class="sidebar d-none d-lg-block">
33

4-
<div class="d-flex flex-items-center p-4 position-sticky top-0 sidebar-background-color" style="z-index: 3;" id="github-logo">
5-
<a href="/{{ currentLanguage }}" class="text-white" aria-hidden="true">
4+
<div class="d-flex flex-items-center p-4 position-sticky top-0 sidebar-background-color" style="z-index: 3;" id="github-logo" role="banner">
5+
<a href="/{{ currentLanguage }}" class="text-white" aria-hidden="true" tabindex="-1">
66
{% octicon "mark-github" height="32" %}
77
</a>
88
<a href="/{{ currentLanguage }}" class="h4-mktg text-white no-underline no-wrap pl-2 flex-auto">{% data ui.header.github_docs %}</a>
99
</div>
1010

11+
<nav>
1112
{% if error == '404' or page.relativePath == 'index.md' %}
1213
<ul class="sidebar-products mt-4">
1314
{% include sidebar-homepage %}
@@ -17,4 +18,5 @@
1718
{% include sidebar-specific-product %}
1819
</ul>
1920
{% endif %}
21+
</nav>
2022
</div>

includes/support.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!-- Contact support banner -->
22
<section class="mt-lg-9 py-7 no-print js-support-banner" style="background-color: #fafbfc;">
33
<div class="container-xl px-3 px-md-6 ">
4-
<h4 class="mb-2">
4+
<h3 class="mb-2 f4">
55
{% data ui.support.still_need_help %}
6-
</h4>
6+
</h3>
77
{% if currentVersion contains 'enterprise' %}{% assign isEnterprise = true %}{% else %}{% assign isEnterprise = false %}{% endif %}
88
<a id="ask-community" href="https://github.community" class="btn btn-outline mr-4 mt-2">
99
{% octicon "people" width="16" %}

0 commit comments

Comments
 (0)