Skip to content

Commit

Permalink
Removed some aria attributes causing accessibility problems (DAC) (#1321
Browse files Browse the repository at this point in the history
)
  • Loading branch information
trevorsaint authored Jan 26, 2021
1 parent 358ceb8 commit 4dfba51
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/components/card/_macro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% set titleSize = params.titleSize | default('2') %}

<div class="card" aria-labelledBy="{{ params.id }}" aria-describedBy="{{ params.textId }}" role="navigation" aria-label="{{ params.ariaBy }}">
<div class="card" aria-labelledBy="{{ params.id }}" aria-describedBy="{{ params.textId }}">

{%- if params.image -%}

Expand Down
21 changes: 9 additions & 12 deletions src/components/card/examples/card-image/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,45 @@

<div class="grid__col col-4@m">
{{ onsCard({
"ariaBy": 'Section highlight',
"id": 'title1',
"textId": 'text1',
"title": 'About the census',
"url": '#0',
"text": 'The census is a survey that gives us information about all the households in England and Wales.',
"image": {
"smallSrc": "/img/small/placeholder-card.png",
"largeSrc": "/img/large/placeholder-card.png",
"alt": "Image placeholder"
"smallSrc": '/img/small/placeholder-card.png',
"largeSrc": '/img/large/placeholder-card.png',
"alt": 'Image placeholder'
}
}) }}
</div>

<div class="grid__col col-4@m">
{{ onsCard({
"ariaBy": 'Section highlight',
"id": 'title2',
"textId": 'text2',
"title": 'Working on the census',
"url": '#0',
"text": 'For Census 2021, we’ll be hiring at least 30,000 field staff across England and Wales.',
"image": {
"smallSrc": "/img/small/placeholder-card.png",
"largeSrc": "/img/large/placeholder-card.png",
"alt": "Image placeholder"
"smallSrc": '/img/small/placeholder-card.png',
"largeSrc": '/img/large/placeholder-card.png',
"alt": 'Image placeholder'
}
}) }}
</div>

<div class="grid__col col-4@m">
{{ onsCard({
"ariaBy": 'Section highlight',
"id": 'title3',
"textId": 'text3',
"title": 'Your data and security',
"url": '#0',
"text": 'How we keep your data safe and what happens to your personal information.',
"image": {
"smallSrc": "/img/small/placeholder-card.png",
"largeSrc": "/img/large/placeholder-card.png",
"alt": "Image placeholder"
"smallSrc": '/img/small/placeholder-card.png',
"largeSrc": '/img/large/placeholder-card.png',
"alt": 'Image placeholder'
}
}) }}
</div>
Expand Down
3 changes: 0 additions & 3 deletions src/components/card/examples/card-lists/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<div class="grid__col col-4@m">
{{ onsCard({
"ariaBy": 'Section highlight',
"id": 'title1',
"textId": 'text1',
"title": 'About the census',
Expand All @@ -26,7 +25,6 @@

<div class="grid__col col-4@m">
{{ onsCard({
"ariaBy": 'Section highlight',
"id": 'title2',
"textId": 'text2',
"title": 'Working on the census',
Expand All @@ -47,7 +45,6 @@

<div class="grid__col col-4@m">
{{ onsCard({
"ariaBy": 'Section highlight',
"id": 'title3',
"textId": 'text3',
"title": 'Your data and security',
Expand Down
3 changes: 0 additions & 3 deletions src/components/card/examples/card-set/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<div class="grid__col col-4@m">
{{ onsCard({
"ariaBy": 'Section highlight',
"id": 'title1',
"textId": 'text1',
"title": 'About the census',
Expand All @@ -16,7 +15,6 @@

<div class="grid__col col-4@m">
{{ onsCard({
"ariaBy": 'Section highlight',
"id": 'title2',
"textId": 'text2',
"title": 'Working on the census',
Expand All @@ -27,7 +25,6 @@

<div class="grid__col col-4@m">
{{ onsCard({
"ariaBy": 'Section highlight',
"id": 'title3',
"textId": 'text3',
"title": 'Your data and security',
Expand Down
1 change: 0 additions & 1 deletion src/components/card/examples/card/index.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% from "components/card/_macro.njk" import onsCard %}

{{ onsCard({
"ariaBy": 'Section highlight',
"id": 'title',
"textId": 'text',
"titleSize": '3',
Expand Down

0 comments on commit 4dfba51

Please sign in to comment.