mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 01:25:36 +00:00
Autofocus primary button in modals (#31883)
This commit is contained in:
parent
c35ea59ee6
commit
5f782f9629
|
@ -99,7 +99,7 @@ export const BlockModal = ({ accountId, acct }) => {
|
||||||
<FormattedMessage id='confirmation_modal.cancel' defaultMessage='Cancel' />
|
<FormattedMessage id='confirmation_modal.cancel' defaultMessage='Cancel' />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Button onClick={handleClick}>
|
<Button onClick={handleClick} autoFocus>
|
||||||
<FormattedMessage id='confirmations.block.confirm' defaultMessage='Block' />
|
<FormattedMessage id='confirmations.block.confirm' defaultMessage='Block' />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -71,7 +71,10 @@ export const ConfirmationModal: React.FC<
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Button onClick={handleClick}>{confirm}</Button>
|
{/* eslint-disable-next-line jsx-a11y/no-autofocus -- we are in a modal and thus autofocusing is justified */}
|
||||||
|
<Button onClick={handleClick} autoFocus>
|
||||||
|
{confirm}
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -88,7 +88,7 @@ export const DomainBlockModal = ({ domain, accountId, acct }) => {
|
||||||
<FormattedMessage id='confirmation_modal.cancel' defaultMessage='Cancel' />
|
<FormattedMessage id='confirmation_modal.cancel' defaultMessage='Cancel' />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Button onClick={handleClick}>
|
<Button onClick={handleClick} autoFocus>
|
||||||
<FormattedMessage id='domain_block_modal.block' defaultMessage='Block server' />
|
<FormattedMessage id='domain_block_modal.block' defaultMessage='Block server' />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -137,7 +137,7 @@ export const MuteModal = ({ accountId, acct }) => {
|
||||||
<FormattedMessage id='confirmation_modal.cancel' defaultMessage='Cancel' />
|
<FormattedMessage id='confirmation_modal.cancel' defaultMessage='Cancel' />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Button onClick={handleClick}>
|
<Button onClick={handleClick} autoFocus>
|
||||||
<FormattedMessage id='confirmations.mute.confirm' defaultMessage='Mute' />
|
<FormattedMessage id='confirmations.mute.confirm' defaultMessage='Mute' />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue