Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Change aria-owns to aria-controls in draft.js
Browse files Browse the repository at this point in the history
Summary:
'aria-owns' creates a parent-child relationship between the owner and ownee in the AX Tree. We really don't want the typeahead dialog to be a child of the input.

`aria-controls` sets up a controller-controllee relationship. This is the correct relationship for the input and its typeahead dialog.

**This is a breaking API change.**

Reviewed By: flarnie

Differential Revision: D5476399

fbshipit-source-id: fe69255351dcd173e08de1aa21d8ee0a6728b68d
  • Loading branch information
jessebeach authored and facebook-github-bot committed Aug 1, 2017
1 parent f983cd8 commit 7f0cab2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/component/base/DraftEditor.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,14 @@ class DraftEditor extends React.Component {
readOnly ? null : this.props.ariaActiveDescendantID
}
aria-autocomplete={readOnly ? null : this.props.ariaAutoComplete}
aria-controls={readOnly ? null : this.props.ariaControls}
aria-describedby={
this._showPlaceholder() ? this._placeholderAccessibilityID : null
}
aria-expanded={readOnly ? null : ariaExpanded}
aria-haspopup={readOnly ? null : 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}
autoCorrect={this.props.autoCorrect}
Expand Down
2 changes: 1 addition & 1 deletion src/component/base/DraftEditorProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ export type DraftEditorProps = {

ariaActiveDescendantID?: string,
ariaAutoComplete?: string,
ariaControls?: string,
ariaDescribedBy?: string,
ariaExpanded?: boolean,
ariaHasPopup?: boolean,
ariaLabel?: string,
ariaMultiline?: boolean,
ariaOwneeID?: string,

webDriverTestID?: string,

Expand Down

0 comments on commit 7f0cab2

Please sign in to comment.