Skip to content

Commit e75d707

Browse files
committed
Decided I should use base.css and use accessible_graphics.css just for the extra requirements. Also made a change to the width attribute on the img tag to fully comply with the HTML5 specification.
1 parent 0b63de5 commit e75d707

2 files changed

Lines changed: 3 additions & 13 deletions

File tree

accessible_graphics/resident_population_2018.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"/>
66
<meta charset="UTF-8"/>
77

8+
<link rel="stylesheet" href="../css/base.css"/>
89
<link rel="stylesheet" href="../css/accessible_graphics.css"/>
910
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans%7CRoboto"/>
1011
</head>
@@ -15,7 +16,7 @@ <h1>Resident Population of Trafford</h1>
1516
<cite>Source: Mid-2018 population statistics, Office for National Statistics.</cite>
1617

1718
<figure>
18-
<img src="https://www.trafforddatalab.io/maps/static/output/trafford_population_2018.png" width="100%" alt="Map of Trafford showing the 21 wards coloured according to their mid-2018 population estimates."/>
19+
<img src="https://www.trafforddatalab.io/maps/static/output/trafford_population_2018.png" width="600" alt="Map of Trafford showing the 21 wards coloured according to their mid-2018 population estimates."/>
1920
<figcaption>
2021
Broadheath ward located in the South of Trafford has the highest resident population in the borough with just over 14,000 people living there. The neighbouring ward of Altrincham is next with just 1,000 fewer residents. The Northern wards of Gorse Hill, Longford and Clifford also have relatively large populations of around 12,500 people. Bowdon ward in the South and Davyhulme East ward in the West of Trafford have the fewest residents, around 9,500 people living in each. The remaining 14 wards have between 10,000 and 12,000 residents.
2122
</figcaption>

css/accessible_graphics.css

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
1-
body
2-
{
3-
padding: 0;
4-
margin: 0;
5-
font-family: 'Open Sans', sans-serif;
6-
color: #212121;
7-
}
8-
91
h1
102
{
11-
font-family: 'Roboto', sans-serif;
12-
color: #707070;
133
margin-bottom: 0.1em; /* to make the heading closer to the citation text */
144
}
155

@@ -25,9 +15,8 @@ cite
2515

2616
img
2717
{
28-
border: 0;
2918
max-height: 100vh; /* we want the graphic to be completely visible in the full height of the display */
30-
max-width: 90vw; /* we also want the graphic to be completely visible in the width of the display with out scrolling - NOTE: the img has a width attribute set to 100% to prevent it appearing full size if the page is rendered without CSS */
19+
max-width: 90vw; /* we also want the graphic to be completely visible in the width of the display with out scrolling - NOTE: the img should also have a width attribute set to 600 pixels to prevent it appearing full size if the page is rendered without CSS */
3120
width: auto;
3221
display: block;
3322
margin: auto;

0 commit comments

Comments
 (0)