Skip to content

Commit 1531cf9

Browse files
Improve accessibility and SEO in layout templates
- Add lang=en attribute to html tags for screen reader compatibility - Add Skip to main content link for keyboard navigation - Add id=main-content and role=main to main container - Add meta description tags for search engine optimization
1 parent d068a16 commit 1531cf9

File tree

3 files changed

+27
-15
lines changed

3 files changed

+27
-15
lines changed

_layouts/default.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
<!DOCTYPE html>
2-
<html>
3-
<head lang="en">
2+
<html lang="en">
3+
<head>
44
<meta charset="UTF-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=no">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
7+
<meta name="description" content="{{ page.description | default: site.description | default: 'HEP Software Foundation - Facilitating cooperation in High Energy Physics software and computing' }}">
78
<title>{{ page.title }}</title>
89
<link rel="icon" type="image/x-icon" href="{{ '/images/hsf_logo_angled.png' | relative_url }}">
910

10-
<!-- bootstrap framework -->
11+
<!-- bootstrap framework CSS -->
1112
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/flatly/bootstrap.min.css">
1213

1314
<link rel="stylesheet" href="{{ '/css/hsf.css' | relative_url }}" type="text/css" />
1415
</head>
1516
<body>
17+
<!-- Skip to main content for accessibility -->
18+
<a href="#main-content" class="sr-only sr-only-focusable">Skip to main content</a>
19+
1620
{% include navbar.ext %}
1721

18-
<div class="container">
22+
<div class="container" id="main-content" role="main">
1923

2024
{{ content }}
2125

_layouts/empty.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
<!-- Used for the training center iframe embedding -->
22
<!DOCTYPE html>
3-
<html>
4-
<head lang="en">
3+
<html lang="en">
4+
<head>
55
<meta charset="UTF-8">
66
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7-
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=no">
7+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
8+
<meta name="description" content="{{ page.description | default: site.description | default: 'HEP Software Foundation - Facilitating cooperation in High Energy Physics software and computing' }}">
89
<title>{{ page.title }}</title>
910
<link rel="icon" type="image/x-icon" href="{{ '/images/hsf_logo_angled.png' | relative_url }}">
1011

11-
<!-- bootstrap framework -->
12+
<!-- Bootstrap framework CSS -->
1213
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/flatly/bootstrap.min.css">
1314

1415
<link rel="stylesheet" href="{{ '/css/hsf.css' | relative_url }}" type="text/css" />
1516
</head>
1617
<body>
17-
<div class="container">
18+
<!-- Skip to main content for accessibility -->
19+
<a href="#main-content" class="sr-only sr-only-focusable">Skip to main content</a>
20+
21+
<div class="container" id="main-content" role="main">
1822

1923
{{ content }}
2024

_layouts/meetings.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
<!DOCTYPE html>
2-
<html>
3-
<head lang="en">
2+
<html lang="en">
3+
<head>
44
<meta charset="UTF-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=no">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
7+
<meta name="description" content="{{ page.description | default: site.description | default: 'HEP Software Foundation - Facilitating cooperation in High Energy Physics software and computing' }}">
78
<title>{{ page.title }}</title>
89
<link rel="icon" type="image/x-icon" href="{{ '/images/hsf_logo_angled.png' | relative_url }}">
910

10-
<!-- bootstrap framework -->
11+
<!-- Bootstrap framework CSS -->
1112
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/flatly/bootstrap.min.css">
1213

1314
<link rel="stylesheet" href="{{ '/css/hsf.css' | relative_url }}" type="text/css" />
1415
</head>
1516
<body>
17+
<!-- Skip to main content for accessibility -->
18+
<a href="#main-content" class="sr-only sr-only-focusable">Skip to main content</a>
19+
1620
{% include navbar.ext %}
1721

18-
<div class="container">
22+
<div class="container" id="main-content" role="main">
1923

2024
{% include fwd_back_link.ext %}
2125

0 commit comments

Comments
 (0)