Skip to content

Commit

Permalink
Merge pull request #404 from appuniversum/feature/accessibility-fixes
Browse files Browse the repository at this point in the history
Accessibility fixes
  • Loading branch information
Dietr committed Jul 18, 2023
2 parents ee4f477 + bece517 commit e4af9d7
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 13 deletions.
6 changes: 2 additions & 4 deletions addon/components/au-accordion.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
<div>
<AuButton
@skin="tertiary"
aria-hidden="true"
focusable="false"
aria-expanded="{{if this.openAccordion 'true' 'false'}}"
data-test-accordion-button
>
Expand All @@ -28,7 +26,7 @@
@icon={{this.iconOpen}}
@alignment="left"
@size="large"
@ariaHidden="true"
@ariaHidden={{true}}
data-test-accordion-icon-open={{this.iconOpen}}
/>
<span class="au-u-hidden-visually">
Expand All @@ -39,7 +37,7 @@
@icon={{this.iconClosed}}
@alignment="left"
@size="large"
@ariaHidden="true"
@ariaHidden={{true}}
data-test-accordion-icon-closed={{this.iconClosed}}
/>
<span class="au-u-hidden-visually">
Expand Down
6 changes: 5 additions & 1 deletion addon/components/au-brand.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<a
href={{@link}}
class="au-c-brand au-c-brand--link {{this.tagline}}"
aria-labelledby="{{this.id}}-brandTitle"
...attributes
>
<div class="au-c-brand__logo">
Expand All @@ -22,7 +23,10 @@
</svg>
</div>
<p class="au-c-brand__logotype">
<span class="au-c-brand__main">Vlaanderen</span>
<span
id="{{this.id}}-brandTitle"
class="au-c-brand__main"
>Vlaanderen</span>
{{#if @tagline}}
<span class="au-c-brand__tagline">{{@tagline}}</span>
{{/if}}
Expand Down
8 changes: 4 additions & 4 deletions addon/components/au-card.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
aria-expanded="{{if this.sectionOpen 'true' 'false'}}"
>
{{#if this.sectionOpen}}
<AuIcon @icon="remove" @size="large" @ariaHidden="true" />
<AuIcon @icon="remove" @size="large" @ariaHidden={{true}} />
<span class="au-u-hidden-visually au-c-card__toggle-false">
Verberg
</span>
{{else}}
<AuIcon @icon="add" @size="large" @ariaHidden="true" />
<AuIcon @icon="add" @size="large" @ariaHidden={{true}} />
<span class="au-u-hidden-visually au-c-card__toggle-true">
Toon
</span>
Expand All @@ -58,12 +58,12 @@
aria-expanded="{{if this.sectionOpen 'true' 'false'}}"
>
{{#if this.sectionOpen}}
<AuIcon @icon="nav-up" @size="large" @ariaHidden="true" />
<AuIcon @icon="nav-up" @size="large" @ariaHidden={{true}} />
<span class="au-u-hidden-visually au-c-card__toggle-false">
Verberg
</span>
{{else}}
<AuIcon @icon="nav-down" @size="large" @ariaHidden="true" />
<AuIcon @icon="nav-down" @size="large" @ariaHidden={{true}} />
<span class="au-u-hidden-visually au-c-card__toggle-true">
Toon
</span>
Expand Down
2 changes: 1 addition & 1 deletion addon/components/au-content-header.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div role="banner" class="au-c-content-header {{this.pictureSize}}">
<div class="au-c-content-header {{this.pictureSize}}">
<picture class="au-c-content-header__bg">
{{yield}}
</picture>
Expand Down
6 changes: 5 additions & 1 deletion addon/components/au-icon.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<svg
role="img"
class="au-c-icon au-c-icon--{{@icon}} {{this.alignment}} {{this.size}}"
aria-hidden="{{if @ariaHidden 'false' 'true'}}"
aria-hidden="{{if
(or (eq @ariaHidden true) (eq @ariaHidden 'true'))
'true'
'false'
}}"
...attributes
>
<use
Expand Down
2 changes: 1 addition & 1 deletion app/styles/ember-appuniversum/_p-ember-power-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $ember-power-select-selected-background: var(--au-gray-200) !default;

// Texts
$ember-power-select-text-color: inherit !default;
$ember-power-select-placeholder-color: var(--au-gray-600) !default;
$ember-power-select-placeholder-color: var(--au-gray-700) !default;
$ember-power-select-highlighted-color: var(--au-blue-700) !default;
$ember-power-select-disabled-option-color: var(--au-gray-200) !default;
$ember-power-select-multiple-selection-color: var(--au-gray-900) !default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const Template = (args) => ({
@options={{this.options}}
@selected={{this.selected}}
@onChange={{fn (mut this.selected)}}
@placeholder={{this.placeholder}}
as |singleselect|>
{{singleselect}}
</PowerSelect>`,
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/components/au-icon-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@icon={{icon.name}}
@size="large"
@alignment="left"
@ariaHidden="true"
@ariaHidden={{true}}
/>
<p>{{icon.name}}</p>
</div>
Expand Down

0 comments on commit e4af9d7

Please sign in to comment.