Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed some aria attributes causing accessibility problems (DAC) #1321

Merged
merged 4 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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