mirror of
https://github.com/mastodon/mastodon.git
synced 2026-10-01 06:19:48 -05:00
Add missing type='button' to button controls (#40575)
This commit is contained in:
@@ -98,7 +98,7 @@ export default class ErrorBoundary extends PureComponent {
|
||||
)}
|
||||
</p>
|
||||
|
||||
<p className='error-boundary__footer'>Mastodon v{version} · <a href={source_url} rel='noopener' target='_blank'><FormattedMessage id='errors.unexpected_crash.report_issue' defaultMessage='Report issue' /></a> · <button onClick={this.handleCopyStackTrace} className={copied ? 'copied' : ''}><FormattedMessage id='errors.unexpected_crash.copy_stacktrace' defaultMessage='Copy stacktrace to clipboard' /></button></p>
|
||||
<p className='error-boundary__footer'>Mastodon v{version} · <a href={source_url} rel='noopener' target='_blank'><FormattedMessage id='errors.unexpected_crash.report_issue' defaultMessage='Report issue' /></a> · <button type='button' onClick={this.handleCopyStackTrace} className={copied ? 'copied' : ''}><FormattedMessage id='errors.unexpected_crash.copy_stacktrace' defaultMessage='Copy stacktrace to clipboard' /></button></p>
|
||||
</div>
|
||||
|
||||
<Helmet>
|
||||
|
||||
@@ -328,7 +328,7 @@ class MediaGallery extends PureComponent {
|
||||
|
||||
{(visible && !uncached) && (
|
||||
<div className='media-gallery__actions'>
|
||||
<button className='media-gallery__actions__pill' onClick={this.handleOpen}><FormattedMessage id='media_gallery.hide' defaultMessage='Hide' /></button>
|
||||
<button type='button' className='media-gallery__actions__pill' onClick={this.handleOpen}><FormattedMessage id='media_gallery.hide' defaultMessage='Hide' /></button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -48,7 +48,7 @@ class TranslateButton extends PureComponent {
|
||||
|
||||
return (
|
||||
<div className='translate-button'>
|
||||
<button className='link-button' onClick={onClick}>
|
||||
<button type='button' className='link-button' onClick={onClick}>
|
||||
<FormattedMessage id='status.show_original' defaultMessage='Show original' />
|
||||
</button>
|
||||
|
||||
@@ -60,7 +60,7 @@ class TranslateButton extends PureComponent {
|
||||
}
|
||||
|
||||
return (
|
||||
<button className='status__content__translate-button' onClick={onClick}>
|
||||
<button type='button' className='status__content__translate-button' onClick={onClick}>
|
||||
<FormattedMessage id='status.translate' defaultMessage='Translate' />
|
||||
</button>
|
||||
);
|
||||
@@ -198,7 +198,7 @@ class StatusContent extends PureComponent {
|
||||
});
|
||||
|
||||
const readMoreButton = renderReadMore && (
|
||||
<button className='status__content__read-more-button' onClick={this.props.onClick} key='read-more'>
|
||||
<button type='button' className='status__content__read-more-button' onClick={this.props.onClick} key='read-more'>
|
||||
<FormattedMessage id='status.read_more' defaultMessage='Read more' /><Icon id='angle-right' icon={ChevronRightIcon} />
|
||||
</button>
|
||||
);
|
||||
|
||||
@@ -14,7 +14,7 @@ export default class ClearColumnButton extends PureComponent {
|
||||
|
||||
render () {
|
||||
return (
|
||||
<button className='text-btn column-header__setting-btn' tabIndex={0} onClick={this.props.onClick}><Icon id='eraser' icon={DeleteForeverIcon} /> <FormattedMessage id='notifications.clear' defaultMessage='Clear notifications' /></button>
|
||||
<button type='button' className='text-btn column-header__setting-btn' tabIndex={0} onClick={this.props.onClick}><Icon id='eraser' icon={DeleteForeverIcon} /> <FormattedMessage id='notifications.clear' defaultMessage='Clear notifications' /></button>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export default class GrantPermissionButton extends PureComponent {
|
||||
|
||||
render () {
|
||||
return (
|
||||
<button className='text-btn column-header__permission-btn' tabIndex={0} onClick={this.props.onClick}>
|
||||
<button type='button' className='text-btn column-header__permission-btn' tabIndex={0} onClick={this.props.onClick}>
|
||||
<FormattedMessage id='notifications.grant_permission' defaultMessage='Grant permission.' />
|
||||
</button>
|
||||
);
|
||||
|
||||
@@ -135,7 +135,7 @@ const SelectRow = ({selectAllChecked, toggleSelectAll, selectedItems, selectionM
|
||||
direction='right'
|
||||
title={intl.formatMessage(messages.more)}
|
||||
>
|
||||
<button className='dropdown-button column-header__select-row__select-menu' disabled={selectedItems.length === 0}>
|
||||
<button type='button' className='dropdown-button column-header__select-row__select-menu' disabled={selectedItems.length === 0}>
|
||||
<span className='dropdown-button__label'>
|
||||
{selectedCount} selected
|
||||
</span>
|
||||
@@ -143,7 +143,7 @@ const SelectRow = ({selectAllChecked, toggleSelectAll, selectedItems, selectionM
|
||||
</button>
|
||||
</Dropdown>
|
||||
<div className='column-header__select-row__mode-button'>
|
||||
<button className='text-btn' tabIndex={0} onClick={handleToggleSelectionMode}>
|
||||
<button type='button' className='text-btn' tabIndex={0} onClick={handleToggleSelectionMode}>
|
||||
{selectionMode ? (
|
||||
<FormattedMessage id='notification_requests.exit_selection' defaultMessage='Done' />
|
||||
) :
|
||||
|
||||
Reference in New Issue
Block a user