Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added

- **Input** adds aria-invalid="true" when element is in error to improve accessibility

## [5.6.2] - 2018-8-17

## [5.6.1] - 2018-08-17
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"vendor": "vtex",
"name": "styleguide",
"version": "5.6.1",
"version": "5.6.2",
"title": "VTEX Styleguide",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed jut to be compliant with changelog, the actual version to be released in IO and NPM is 5.6.3

"description": "The VTEX Styleguide components for the Render framework",
"builders": {
Expand Down
3 changes: 3 additions & 0 deletions react/components/Input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class Input extends Component {
} = this.props
const { active } = this.state

const inputAriaInvalid = error || errorMessage ? 'true' : undefined

const dataAttrs = {}
for (const key of Object.keys(dataAttributes)) {
dataAttrs[`data-${key}`] = dataAttributes[key]
Expand Down Expand Up @@ -152,6 +154,7 @@ class Input extends Component {
autoCorrect={this.props.autoCorrect}
autoFocus={this.props.autoFocus}
autoSave={this.props.autoSave}
aria-invalid={inputAriaInvalid}
defaultValue={this.props.defaultValue}
inputMode={this.props.inputMode}
list={this.props.list}
Expand Down