mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
A11y: Explicit <form> element around compose area (#19742)
This commit is contained in:
parent
c2170991c7
commit
0165449e3a
@ -6,6 +6,7 @@ export default class Button extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
text: PropTypes.node,
|
||||
type: PropTypes.string,
|
||||
onClick: PropTypes.func,
|
||||
disabled: PropTypes.bool,
|
||||
block: PropTypes.bool,
|
||||
@ -42,6 +43,7 @@ export default class Button extends React.PureComponent {
|
||||
onClick={this.handleClick}
|
||||
ref={this.setRef}
|
||||
title={this.props.title}
|
||||
type={this.props.type}
|
||||
>
|
||||
{this.props.text || this.props.children}
|
||||
</button>
|
||||
|
@ -217,7 +217,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='compose-form'>
|
||||
<form className='compose-form'>
|
||||
<WarningContainer />
|
||||
|
||||
<ReplyIndicatorContainer />
|
||||
@ -279,10 +279,16 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
|
||||
<div className='compose-form__publish'>
|
||||
<div className='compose-form__publish-button-wrapper'>
|
||||
<Button text={publishText} onClick={this.handleSubmit} disabled={!this.canSubmit()} block />
|
||||
</div>
|
||||
<Button
|
||||
type="submit"
|
||||
text={publishText}
|
||||
onClick={this.handleSubmit}
|
||||
disabled={!this.canSubmit()}
|
||||
block
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user