Skip to content

Commit

Permalink
Add name attribute to filter buttons to guarantee accessibility
Browse files Browse the repository at this point in the history
Many screen readers will read button contents, but adding a name
ensures this functionality more broadly.
  • Loading branch information
komali2 committed Mar 20, 2021
1 parent e7020f7 commit 5a7ea64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="container-fluid px-1 pt-7 pb-4 filter-buttons-container" :class="{ desktop: $vuetify.breakpoint.mdAndUp, 'sidebar-expanded': appState.factoryDetailsExpanded }" v-if="appState.isInitialPage">
<display-setting-bottom-sheet />
<v-btn class="mx-2 mb-5 primary--text" v-for="button in filterButtonsData" :key="button.value" @click="onClickFilterButton(button.value)" rounded :class="{ 'v-btn--active': checkActive(button.value) }" color="white">
<v-btn class="mx-2 mb-5 primary--text" v-for="button in filterButtonsData" :key="button.value" @click="onClickFilterButton(button.value)" rounded :class="{ 'v-btn--active': checkActive(button.value) }" color="white" :name="button.text">
<v-icon :color="button.color">mdi-map-marker</v-icon>
{{ button.text }}
</v-btn>
Expand Down Expand Up @@ -220,7 +220,8 @@ export default createComponent({
const filterButtonsData = defaultFactoryDisplayStatuses.map(v => ({
text: getDisplayStatusText(v),
color: getDisplayStatusColor(v),
value: v
value: v,
name: v
}))
return {
Expand Down

0 comments on commit 5a7ea64

Please sign in to comment.