function elementAttributes () {
  const attrs = Object.assign({}, this.filteredAttributes)
  // pass the ID prop through to the root element
  if (this.id) {
    attrs.id = this.id
  } else {
    attrs.id = this.defaultId
  }
  // pass an explicitly given name prop through to the root element
  if (this.hasGivenName) {
    attrs.name = this.name
  }

  // If there is help text, have this element be described by it.
  if (this.help && !has(attrs, 'aria-describedby')) {
    attrs['aria-describedby'] = `${attrs.id}-help`
  }

  // Ensure we dont have a class attribute unless we are actually applying classes.
  if (this.classes.input && (!Array.isArray(this.classes.input) || this.classes.input.length)) {
    attrs.class = this.classes.input
  }

  // @todo Filter out "local props" for custom inputs.

  return attrs
}
Reducer for attributes that will be applied to each core input element.
@return {object}