Skip to content

Commit 3c89144

Browse files
authored
Merge pull request #508 from appuniversum/feature/accessibility-update
Accessibility update / Tested for frontend-subsidiepunt
2 parents 3e2765c + 97b16f0 commit 3c89144

File tree

5 files changed

+44
-15
lines changed

5 files changed

+44
-15
lines changed

addon/components/au-main-header.gts

+18-8
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ export interface AuMainHeaderSignature {
1313
appTitle: string;
1414
brandLink?: string;
1515
contactRoute?: string;
16+
contactLabel?: string;
1617
homeRoute?: string;
18+
navigationAriaLabel?: string;
1719
};
1820
Blocks: {
1921
default: [];
@@ -22,6 +24,16 @@ export interface AuMainHeaderSignature {
2224
}
2325

2426
export default class AuMainHeader extends Component<AuMainHeaderSignature> {
27+
get contactLabel() {
28+
if (this.args.contactLabel) return this.args.contactLabel;
29+
else return 'Contacteer ons';
30+
}
31+
32+
get navigationAriaLabel() {
33+
if (this.args.navigationAriaLabel) return this.args.navigationAriaLabel;
34+
else return 'Informatie en instellingen';
35+
}
36+
2537
@action
2638
headerLinkFocus() {
2739
document.querySelector<HTMLElement>('#main')?.focus();
@@ -49,7 +61,10 @@ export default class AuMainHeader extends Component<AuMainHeaderSignature> {
4961
Naar de hoofdinhoud
5062
</a>
5163
</div>
52-
<nav class="au-c-main-header__actions">
64+
<nav
65+
aria-label={{this.navigationAriaLabel}}
66+
class="au-c-main-header__actions"
67+
>
5368
<ul class="au-c-list-horizontal">
5469
{{#if @contactRoute}}
5570
<li class="au-c-list-horizontal__item">
@@ -58,7 +73,7 @@ export default class AuMainHeader extends Component<AuMainHeaderSignature> {
5873
@skin="secondary"
5974
@icon={{QuestionCircleIcon}}
6075
>
61-
Contacteer ons
76+
{{this.contactLabel}}
6277
</AuLink>
6378
</li>
6479
{{/if}}
@@ -79,12 +94,7 @@ class NavigationNarrator extends Component {
7994
}
8095

8196
<template>
82-
<div
83-
aria-live="assertive"
84-
aria-controls="main"
85-
aria-atomic="true"
86-
aria-relevant="all"
87-
>
97+
<div aria-live="assertive" aria-atomic="true" aria-relevant="all">
8898
<span class="au-u-hidden-visually">
8999
{{this.activeRoute}}
90100
</span>

stories/5-components/Brand/AuMainHeader.stories.js

+14
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ export default {
1313
control: 'text',
1414
description: 'Pass a route for the contact link',
1515
},
16+
contactLabel: {
17+
control: 'text',
18+
description:
19+
'Set the label for the contact link (default: Contacteer ons)',
20+
},
21+
navigationAriaLabel: {
22+
control: 'text',
23+
description:
24+
'Set the aria-label for the navigation (default: Informatie en instellingen)',
25+
},
1626
},
1727
parameters: {
1828
layout: 'padded',
@@ -26,6 +36,8 @@ const Template = (args) => ({
2636
@appTitle={{this.appTitle}}
2737
@homeRoute={{this.homeRoute}}
2838
@contactRoute={{this.contactRoute}}
39+
@contactLabel={{this.contactLabel}}
40+
@navigationAriaLabel={{this.navigationAriaLabel}}
2941
>
3042
<AuDropdown @title="Demo dropdown" @alignment="right" role="menu">
3143
<AuButton @skin="link" @icon="logout" role="menuitem">
@@ -42,4 +54,6 @@ Component.args = {
4254
appTitle: 'App title',
4355
homeRoute: 'home',
4456
contactRoute: 'contact',
57+
contactLabel: 'Contacteer ons',
58+
navigationAriaLabel: 'Informatie en instellingen',
4559
};

stories/5-components/Navigation/AuDropdown.stories.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export default {
4747

4848
const Template = (args) => ({
4949
template: hbs`
50+
{{! template-lint-disable require-context-role }}
5051
<AuDropdown
5152
@title={{this.title}}
5253
@alignment={{this.alignment}}
@@ -57,20 +58,22 @@ const Template = (args) => ({
5758
@hideText={{this.hideText}}
5859
@alert={{this.alert}}
5960
@onClose={{this.onClose}}
60-
role="menu"
6161
>
6262
<AuButton @skin="link" @icon="switch" role="menuitem">
6363
Switch profile
6464
</AuButton>
6565
<AuButton @skin="link" @icon="logout" role="menuitem">
6666
Afmelden
6767
</AuButton>
68-
</AuDropdown>`,
68+
</AuDropdown>
69+
{{! template-lint-enable require-context-role }}
70+
`,
6971
context: args,
7072
});
7173

7274
const TemplateSeparator = (args) => ({
7375
template: hbs`
76+
{{! template-lint-disable require-context-role }}
7477
<AuDropdown
7578
@title={{this.title}}
7679
@alignment={{this.alignment}}
@@ -81,7 +84,6 @@ const TemplateSeparator = (args) => ({
8184
@hideText={{this.hideText}}
8285
@alert={{this.alert}}
8386
@onClose={{this.onClose}}
84-
role="menu"
8587
>
8688
<AuButton @skin="link" role="menuitem">
8789
Agendapunt toevoegen
@@ -103,9 +105,12 @@ const TemplateSeparator = (args) => ({
103105
<AuButton @alert="true" @skin="link" @icon="bin" role="menuitem">
104106
Verwijder
105107
</AuButton>
106-
</AuDropdown>`,
108+
</AuDropdown>
109+
{{! template-lint-enable require-context-role }}
110+
`,
107111
context: args,
108112
});
113+
/* prettier-ignore-end */
109114

110115
export const Component = Template.bind({});
111116
Component.args = {

styles/components/_c-data-table.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
position: relative;
192192
text-decoration: underline;
193193
text-decoration-color: var(--au-gray-300);
194-
color: var(--au-gray-600);
194+
color: var(--au-gray-700);
195195
transition: color var(--au-transition);
196196

197197
&:hover {

styles/components/_c-help-text.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
========================================================================== */
77

88
$au-help-text-color: var(--au-gray-900) !default;
9-
$au-help-text-secondary-color: var(--au-gray-600) !default;
10-
$au-help-text-tertiary-color: var(--au-gray-600) !default;
9+
$au-help-text-secondary-color: var(--au-gray-700) !default;
10+
$au-help-text-tertiary-color: var(--au-gray-700) !default;
1111
$au-help-text-warning-color: var(--au-orange-700) !default;
1212
$au-help-text-error-color: var(--au-red-700) !default;
1313
$au-help-text-font-size: var(--au-small) !default;

0 commit comments

Comments
 (0)