Skip to content

Commit

Permalink
Add aria-multiline attr to DraftEditor
Browse files Browse the repository at this point in the history
Summary:
`aria-multiline` is used to indicate to assistive technology agents that a textbox is a multiline textbox. When `aria-multiline` is true, an AT should treat return key presses as carriage returns, not submit actions.

https://www.w3.org/TR/wai-aria-1.1/#aria-multiline

teeeeeeeested: `npm run test && npm run lint && npm run flow`
Closes facebookarchive/draft-js#1295

Differential Revision: D5464455

fbshipit-source-id: e0033db62f4b0529875ee77fe5b0635222b16af4
  • Loading branch information
jessebeach authored and facebook-github-bot committed Jul 22, 2017
1 parent b015d2e commit d29a585
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/component/base/DraftEditor.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ class DraftEditor extends React.Component {
aria-expanded={readOnly ? null : this.props.ariaExpanded}
aria-haspopup={readOnly ? null : this.props.ariaHasPopup}
aria-label={this.props.ariaLabel}
aria-multiline={this.props.ariaMultiline}
aria-owns={readOnly ? null : this.props.ariaOwneeID}
autoCapitalize={this.props.autoCapitalize}
autoComplete={this.props.autoComplete}
Expand Down
1 change: 1 addition & 0 deletions src/component/base/DraftEditorProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export type DraftEditorProps = {
ariaExpanded?: boolean,
ariaHasPopup?: boolean,
ariaLabel?: string,
ariaMultiline?: boolean,
ariaOwneeID?: string,

webDriverTestID?: string,
Expand Down

0 comments on commit d29a585

Please sign in to comment.