Skip to content

Commit

Permalink
feat:検査陽性者の状況のsvgのrole属性を修正し、aria-labelに具体的人数を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
Hibiro22 committed Mar 8, 2020
1 parent 690f889 commit 314c0ff
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
17 changes: 17 additions & 0 deletions components/ConfirmedCasesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
viewBox="0 0 340 120"
fill="none"
xmlns="http://www.w3.org/2000/svg"
role="img"
:aria-label="
ariaLabel(検査実施人数, 陽性物数, 入院中, 軽症中等症, 重症, 死亡, 退院)
"
>
<mask id="path-1-inside-1" fill="white">
<path
Expand Down Expand Up @@ -200,6 +204,19 @@ export default {
return 0
}
}
},
/** グラフ内容がわかる支援技術用テキストの中身を取得する **/
ariaLabel(
inspected,
positive,
hospitalized,
mild,
critically,
deceased,
discharged
) {
const ariaLabel = `検査陽性者の状況: 検査実施人数は${inspected}人、うち累積の陽性者数は${positive}人です。入院中は${hospitalized}人で、うち軽症・中等症は${mild}人、また重症は${critically}人です。さらに死亡は${deceased}人、退院は${discharged}人です。`
return ariaLabel
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions components/SideNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
class="SideNavigation-ListItemContainer"
@click="closeNavi"
>
<div role="listitem">
<ListItem :link="item.link" :icon="item.icon" :title="item.title" role="link" />
</div>
<ListItem :link="item.link" :icon="item.icon" :title="item.title" />
<v-divider v-show="item.divider" class="SideNavigation-Divider" />
</v-container>
</v-list>
Expand Down Expand Up @@ -258,7 +256,7 @@ export default {
left: 0;
display: block !important;
width: 100%;
z-index: z-index-of(opened-side-navigation);
z-index: z-index-of(opened-side-navigation);
background-color: $white;
}
}
Expand Down
5 changes: 1 addition & 4 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
:title-id="'details-of-confirmed-cases'"
:date="headerItem.date"
>
<confirmed-cases-table
aria-label="検査陽性者の状況"
v-bind="confirmedCases"
/>
<confirmed-cases-table v-bind="confirmedCases" />
</svg-card>
</v-col>
<v-col cols="12" md="6" class="DataCard">
Expand Down

0 comments on commit 314c0ff

Please sign in to comment.