carbon-components-vue icon indicating copy to clipboard operation
carbon-components-vue copied to clipboard

Adopt a convention for attribute names where they apply to an inner component

Open lee-chase opened this issue 6 years ago • 2 comments

There are often attributes passed to child components such as aria-labels, title etc which should not be hardcoded. Currently a number of these for properties title, alt text, aria-label etc.

Currently, aria-label can be found both as 'ariaLabelForXXX' and 'XXXariaLabel' this is inconsistent. There are also uses of an object to pass values such as for pagination in the cv-data-table component.

Adopt a convention such as

Options for properties: 1. childThing: { ...props}

e.g. expandAllButton: { ariaLabel: 'bla bla bla' }

propNameForChildThing: 'bla bla bla'

lee-chase avatar Oct 06 '19 17:10 lee-chase