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

Commit

Permalink
Adding aria-describedby attribute the draft editor
Browse files Browse the repository at this point in the history
Summary:
We have a ariaDescribedBy prop in DraftEditorProps.js but it is not set in DraftEditor.
Currently the aria-describedby attribute is set based on if there is a placeholder and is set to the placeholderId.
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute

issue on github which also has suggested the fix: #1214

Reviewed By: jessebeach, flarnie

Differential Revision: D6154932

fbshipit-source-id: d828ca5f73921c5d303820c5aed5b39eda08ccd1
  • Loading branch information
Suraj Karnati authored and facebook-github-bot committed Jan 9, 2018
1 parent 3689a93 commit a6af3e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/component/base/DraftEditor.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class DraftEditor extends React.Component<DraftEditorProps, State> {
aria-autocomplete={readOnly ? null : this.props.ariaAutoComplete}
aria-controls={readOnly ? null : this.props.ariaControls}
aria-describedby={
this._showPlaceholder() ? this._placeholderAccessibilityID : null
this.props.ariaDescribedBy || this._placeholderAccessibilityID
}
aria-expanded={readOnly ? null : ariaExpanded}
aria-label={this.props.ariaLabel}
Expand Down

0 comments on commit a6af3e1

Please sign in to comment.