A11y: Explicit <form> element around compose area (#19742)
This commit is contained in:
		| @@ -6,6 +6,7 @@ export default class Button extends React.PureComponent { | |||||||
|  |  | ||||||
|   static propTypes = { |   static propTypes = { | ||||||
|     text: PropTypes.node, |     text: PropTypes.node, | ||||||
|  |     type: PropTypes.string, | ||||||
|     onClick: PropTypes.func, |     onClick: PropTypes.func, | ||||||
|     disabled: PropTypes.bool, |     disabled: PropTypes.bool, | ||||||
|     block: PropTypes.bool, |     block: PropTypes.bool, | ||||||
| @@ -42,6 +43,7 @@ export default class Button extends React.PureComponent { | |||||||
|         onClick={this.handleClick} |         onClick={this.handleClick} | ||||||
|         ref={this.setRef} |         ref={this.setRef} | ||||||
|         title={this.props.title} |         title={this.props.title} | ||||||
|  |         type={this.props.type} | ||||||
|       > |       > | ||||||
|         {this.props.text || this.props.children} |         {this.props.text || this.props.children} | ||||||
|       </button> |       </button> | ||||||
|   | |||||||
| @@ -217,7 +217,7 @@ class ComposeForm extends ImmutablePureComponent { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     return ( |     return ( | ||||||
|       <div className='compose-form'> |       <form className='compose-form'> | ||||||
|         <WarningContainer /> |         <WarningContainer /> | ||||||
|  |  | ||||||
|         <ReplyIndicatorContainer /> |         <ReplyIndicatorContainer /> | ||||||
| @@ -279,10 +279,16 @@ class ComposeForm extends ImmutablePureComponent { | |||||||
|  |  | ||||||
|         <div className='compose-form__publish'> |         <div className='compose-form__publish'> | ||||||
|           <div className='compose-form__publish-button-wrapper'> |           <div className='compose-form__publish-button-wrapper'> | ||||||
|             <Button text={publishText} onClick={this.handleSubmit} disabled={!this.canSubmit()} block /> |             <Button | ||||||
|           </div> |               type="submit" | ||||||
|  |               text={publishText} | ||||||
|  |               onClick={this.handleSubmit} | ||||||
|  |               disabled={!this.canSubmit()} | ||||||
|  |               block | ||||||
|  |             /> | ||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|  |       </form> | ||||||
|     ); |     ); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user