Skip to content

Commit

Permalink
refactor: code review changes
Browse files Browse the repository at this point in the history
remove test, change prop name, and update api-generator gitignore
  • Loading branch information
jyburns committed Oct 11, 2020
1 parent 7906d9f commit b7f41c8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/api-generator/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/dist/
/src/locale/*
!/src/en
!/src/locale/en
1 change: 1 addition & 0 deletions packages/api-generator/src/locale/en/v-chip.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"active": "Determines whether the chip is visible or not.",
"close": "Adds remove button",
"closeIcon": "Change the default icon used for **close** chips",
"closeLabel": "Text used for *aria-label* on the close button in **close** chips. Can also be customized globally in [Internationalization](/customization/internationalization).",
"disabled": "Disables the chip, making it un-selectable",
"draggable": "Makes the chip draggable",
"filter": "Displays a selection icon when selected",
Expand Down
4 changes: 2 additions & 2 deletions packages/vuetify/src/components/VChip/VChip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default mixins(
type: String,
default: '$delete',
},
closeAriaLabel: {
closeLabel: {
type: String,
default: '$vuetify.close',
},
Expand Down Expand Up @@ -151,7 +151,7 @@ export default mixins(
size: 18,
},
attrs: {
'aria-label': this.$vuetify.lang.t(this.closeAriaLabel),
'aria-label': this.$vuetify.lang.t(this.closeLabel),
},
on: {
click: (e: Event) => {
Expand Down
9 changes: 0 additions & 9 deletions packages/vuetify/src/components/VChip/__tests__/VChip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,4 @@ describe('VChip.ts', () => {

expect(wrapper.isVisible()).toBe(false)
})

it('should render a close button with an aria-label', async () => {
const wrapper = mountFunction({
propsData: { close: true },
})
const close = wrapper.find('.v-chip__close')

expect(close.element.attributes.hasOwnProperty('aria-label')).toBe(true)
})
})

0 comments on commit b7f41c8

Please sign in to comment.