src/widgets/ActiveField.php
protected function addAriaAttributes(&$options)
    {
        if ($this->addAriaAttributes) {
            if (!isset($options['aria-required']) && $this->model->isAttributeRequired($this->attribute)) {
                $options['aria-required'] = 'true';
            }
            if (!isset($options['aria-invalid'])) {
                if ($this->model->hasErrors($this->attribute)) {
                    $options['aria-invalid'] = 'true';
                }
            }
        }
    }
protected function addAriaAttributes(&$options)
    {
        if ($this->addAriaAttributes) {
            if (!isset($options['aria-required']) && $this->model->isAttributeRequired($this->attribute)) {
                $options['aria-required'] = 'true';
            }
            if (!isset($options['aria-invalid'])) {
                if ($this->model->hasErrors($this->attribute)) {
                    $options['aria-invalid'] = 'true';
                }
            }
        }
    }
protected function addAriaAttributes ( & $ options ) { if ( $ this -> addAriaAttributes ) { if ( ! isset ( $ options [ 'aria-required' ] ) && $ this -> model -> isAttributeRequired ( $ this -> attribute ) ) { $ options [ 'aria-required' ] = 'true' ; } if ( ! isset ( $ options [ 'aria-invalid' ] ) ) { if ( $ this -> model -> hasErrors ( $ this -> attribute ) ) { $ options [ 'aria-invalid' ] = 'true' ; } } } }
Adds aria attributes to the input options.

@param $options array input options
Adds aria attributes to the input options .