Skip to content

Commit 4e9be0c

Browse files
committed
fix some of the accessibility issues with the footer
1 parent b49cfd5 commit 4e9be0c

File tree

7 files changed

+25
-30
lines changed

7 files changed

+25
-30
lines changed

addon/components/es-footer.js

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
1-
import Component from '@ember/component';
2-
import layout from '../templates/components/es-footer';
1+
import Component from 'sparkles-component';
2+
33
import {
44
socialLinks,
55
infoLinks,
66
contributorLinks,
77
tagline
88
} from '../constants/es-footer';
99

10+
export default class EsPageHeader extends Component {
11+
currentYear = null
1012

11-
export default Component.extend({
12-
layout,
13-
attributeBindings: ['ariaLabel:aria-label'],
14-
classNames: ['es-footer'],
15-
tagName: 'footer',
16-
currentYear: null,
17-
init() {
18-
this._super(...arguments);
13+
constructor() {
14+
super();
1915
this.currentYear = new Date().getUTCFullYear();
20-
},
16+
}
2117

22-
socialLinks,
23-
tagline,
24-
contributorLinks,
25-
infoLinks,
18+
socialLinks = socialLinks
2619

27-
//accessibility support
28-
ariaDescribedby: null,
29-
ariaLabel: null,
30-
ariaRole: 'contentinfo',
31-
title: null
32-
});
20+
tagline = tagline
21+
contributorLinks = contributorLinks
22+
infoLinks = infoLinks
23+
}

addon/constants/es-footer.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,26 @@
22
const socialLinks = [{
33
title: 'Twitter',
44
href: 'http://twitter.com/emberjs',
5-
class: 'twitter-logo'
5+
class: 'twitter-logo',
6+
label: 'Official Ember Twitter Account'
67
}, {
78
title: 'GitHub',
89
href: 'https://github.com/emberjs/ember.js',
9-
class: 'github-logo'
10+
class: 'github-logo',
11+
label: 'Ember.js github repository'
1012
}, {
1113
title: 'Discord',
1214
href: 'https://discordapp.com/invite/zT3asNS',
13-
class: 'discord-logo'
15+
class: 'discord-logo',
16+
label: 'Join the Ember Community Discord'
1417
}];
1518

1619

1720
const contributorLinks = [{
1821
name: 'Hosted by:',
1922
title: "Heroku",
2023
href: 'https://www.heroku.com/emberjs',
21-
class: 'heroku-logo'
24+
class: 'heroku-logo',
2225
}, {
2326
name: 'CDN provided by:',
2427
title: "Fastly",

addon/templates/components/es-footer.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="footer responsive">
1+
<footer class="es-footer" ...attributes>
22
<div class="container">
33

44
{{yield
@@ -22,4 +22,4 @@
2222
{{/unless}}
2323

2424
</div>
25-
</div>
25+
</footer>

addon/templates/components/es-footer/es-contributions.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{#each contributorLinks as |link|}}
66
<div class="contributor">
77
<p>{{link.name}}</p>
8-
<a href={{link.href}} title={{link.title}}>
8+
<a href={{link.href}} title={{link.title}} aria-label={{link.title}}>
99
{{svg-jar link.class class="contributor-logo"}}
1010
</a>
1111
</div>

addon/templates/components/es-footer/es-statement.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<p class="footer-tagline">{{tagline}}</p>
66
<div class="footer-social">
77
{{#each socialLinks as |link|}}
8-
<a href={{link.href}} title={{link.title}}>
8+
<a href={{link.href}} title={{link.title}} aria-label={{link.label}}>
99
{{svg-jar link.class}}
1010
</a>
1111
{{/each}}

app/components/es-footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { default } from 'ember-styleguide/components/es-footer';
1+
export { default } from 'ember-styleguide/components/es-footer';

app/templates/components/es-footer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from 'ember-styleguide/templates/components/es-footer';

0 commit comments

Comments
 (0)