From bfe46d08f97b4b19ab6f86c32be01cce945517d0 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 4 Apr 2023 10:33:44 -0400 Subject: [PATCH] [Glitch] Ensure tabIndex is number instead of string Port ec0c104bf25f2689c31bb79f9f447be1a9b3da7f to glitch-soc Signed-off-by: Claire --- .../glitch/components/admin/ReportReasonSelector.jsx | 4 ++-- .../flavours/glitch/components/autosuggest_input.jsx | 2 +- .../glitch/components/autosuggest_textarea.jsx | 2 +- .../glitch/components/column_back_button_slim.jsx | 2 +- .../flavours/glitch/components/dropdown_menu.jsx | 2 +- .../flavours/glitch/components/error_boundary.jsx | 2 +- app/javascript/flavours/glitch/components/gifv.jsx | 4 ++-- .../components/intersection_observer_article.jsx | 2 +- .../components/picture_in_picture_placeholder.jsx | 2 +- app/javascript/flavours/glitch/components/poll.jsx | 2 +- app/javascript/flavours/glitch/components/spoilers.jsx | 2 +- app/javascript/flavours/glitch/components/status.jsx | 6 +++--- .../flavours/glitch/components/status_content.jsx | 10 +++++----- .../flavours/glitch/features/about/index.jsx | 2 +- .../features/account/components/account_note.jsx | 6 +++--- .../flavours/glitch/features/audio/index.jsx | 8 ++++---- .../features/compose/components/dropdown_menu.jsx | 2 +- .../features/compose/components/language_dropdown.jsx | 2 +- .../glitch/features/compose/components/search.jsx | 2 +- .../glitch/features/compose/components/upload.jsx | 2 +- .../direct_timeline/components/conversation.jsx | 2 +- .../flavours/glitch/features/filters/select_filter.jsx | 4 ++-- .../glitch/features/list_editor/components/search.jsx | 2 +- .../flavours/glitch/features/list_editor/index.jsx | 2 +- .../flavours/glitch/features/list_timeline/index.jsx | 4 ++-- .../features/local_settings/navigation/item/index.jsx | 2 +- .../features/notifications/components/admin_report.jsx | 2 +- .../features/notifications/components/admin_signup.jsx | 2 +- .../notifications/components/clear_column_button.jsx | 2 +- .../features/notifications/components/follow.jsx | 2 +- .../notifications/components/follow_request.jsx | 2 +- .../components/grant_permission_button.jsx | 2 +- .../glitch/features/pinned_accounts_editor/index.jsx | 2 +- .../glitch/features/report/components/option.jsx | 2 +- .../flavours/glitch/features/status/index.jsx | 2 +- .../glitch/features/ui/components/actions_modal.jsx | 2 +- .../glitch/features/ui/components/column_link.jsx | 2 +- .../glitch/features/ui/components/media_modal.jsx | 4 ++-- .../glitch/features/ui/components/onboarding_modal.jsx | 2 +- .../flavours/glitch/features/video/index.jsx | 6 +++--- 40 files changed, 58 insertions(+), 58 deletions(-) diff --git a/app/javascript/flavours/glitch/components/admin/ReportReasonSelector.jsx b/app/javascript/flavours/glitch/components/admin/ReportReasonSelector.jsx index 8478ba366..ecefe7a84 100644 --- a/app/javascript/flavours/glitch/components/admin/ReportReasonSelector.jsx +++ b/app/javascript/flavours/glitch/components/admin/ReportReasonSelector.jsx @@ -33,7 +33,7 @@ class Category extends React.PureComponent { const { id, text, disabled, selected, children } = this.props; return ( -
+
{selected && }
@@ -74,7 +74,7 @@ class Rule extends React.PureComponent { const { id, text, disabled, selected } = this.props; return ( -
+
{selected && } {text} diff --git a/app/javascript/flavours/glitch/components/autosuggest_input.jsx b/app/javascript/flavours/glitch/components/autosuggest_input.jsx index 90ff298c0..ea9fd0828 100644 --- a/app/javascript/flavours/glitch/components/autosuggest_input.jsx +++ b/app/javascript/flavours/glitch/components/autosuggest_input.jsx @@ -180,7 +180,7 @@ export default class AutosuggestInput extends ImmutablePureComponent { } return ( -
+
{inner}
); diff --git a/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx b/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx index 6e6e567b9..a016e44b7 100644 --- a/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx +++ b/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx @@ -186,7 +186,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent { } return ( -
+
{inner}
); diff --git a/app/javascript/flavours/glitch/components/column_back_button_slim.jsx b/app/javascript/flavours/glitch/components/column_back_button_slim.jsx index b43d85b3b..4df045b5f 100644 --- a/app/javascript/flavours/glitch/components/column_back_button_slim.jsx +++ b/app/javascript/flavours/glitch/components/column_back_button_slim.jsx @@ -26,7 +26,7 @@ export default class ColumnBackButtonSlim extends React.PureComponent { render () { return (
-
+
diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.jsx b/app/javascript/flavours/glitch/components/dropdown_menu.jsx index f4b6e059f..7fb75b59e 100644 --- a/app/javascript/flavours/glitch/components/dropdown_menu.jsx +++ b/app/javascript/flavours/glitch/components/dropdown_menu.jsx @@ -119,7 +119,7 @@ class DropdownMenu extends React.PureComponent { return (
  • - + {text}
  • diff --git a/app/javascript/flavours/glitch/components/error_boundary.jsx b/app/javascript/flavours/glitch/components/error_boundary.jsx index 8518dfc86..234a53417 100644 --- a/app/javascript/flavours/glitch/components/error_boundary.jsx +++ b/app/javascript/flavours/glitch/components/error_boundary.jsx @@ -72,7 +72,7 @@ export default class ErrorBoundary extends React.PureComponent { } return ( -
    +

    diff --git a/app/javascript/flavours/glitch/components/gifv.jsx b/app/javascript/flavours/glitch/components/gifv.jsx index 9ec201c6c..1ce7e7c29 100644 --- a/app/javascript/flavours/glitch/components/gifv.jsx +++ b/app/javascript/flavours/glitch/components/gifv.jsx @@ -46,7 +46,7 @@ export default class GIFV extends React.PureComponent { width={width} height={height} role='button' - tabIndex='0' + tabIndex={0} aria-label={alt} title={alt} lang={lang} @@ -57,7 +57,7 @@ export default class GIFV extends React.PureComponent {

    +
    diff --git a/app/javascript/flavours/glitch/components/poll.jsx b/app/javascript/flavours/glitch/components/poll.jsx index 2ccc1761e..fb37612d9 100644 --- a/app/javascript/flavours/glitch/components/poll.jsx +++ b/app/javascript/flavours/glitch/components/poll.jsx @@ -154,7 +154,7 @@ class Poll extends ImmutablePureComponent { {!showResults && ( {spoilerText} {' '} -

    , diff --git a/app/javascript/flavours/glitch/components/status.jsx b/app/javascript/flavours/glitch/components/status.jsx index fa90c98d0..fbb610823 100644 --- a/app/javascript/flavours/glitch/components/status.jsx +++ b/app/javascript/flavours/glitch/components/status.jsx @@ -564,7 +564,7 @@ class Status extends ImmutablePureComponent { if (hidden) { return ( -
    +
    {status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])} {status.get('content')}
    @@ -581,7 +581,7 @@ class Status extends ImmutablePureComponent { return ( -
    +
    : {matchedFilters.join(', ')}. {' '}
    -
    @@ -65,7 +65,7 @@ class Header extends ImmutablePureComponent { } else { action_buttons = (
    -
    diff --git a/app/javascript/flavours/glitch/features/audio/index.jsx b/app/javascript/flavours/glitch/features/audio/index.jsx index fd7229cc5..556a74ac4 100644 --- a/app/javascript/flavours/glitch/features/audio/index.jsx +++ b/app/javascript/flavours/glitch/features/audio/index.jsx @@ -476,7 +476,7 @@ class Audio extends React.PureComponent { } return ( -
    +
    @@ -549,7 +549,7 @@ class Audio extends React.PureComponent {
    diff --git a/app/javascript/flavours/glitch/features/compose/components/dropdown_menu.jsx b/app/javascript/flavours/glitch/features/compose/components/dropdown_menu.jsx index 1ea0df536..1ccccad31 100644 --- a/app/javascript/flavours/glitch/features/compose/components/dropdown_menu.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/dropdown_menu.jsx @@ -169,7 +169,7 @@ export default class ComposerOptionsDropdownContent extends React.PureComponent onClick={this.handleClick} onKeyDown={this.handleKeyDown} role='option' - tabIndex='0' + tabIndex={0} key={name} data-index={i} ref={active ? this.setFocusRef : null} diff --git a/app/javascript/flavours/glitch/features/compose/components/language_dropdown.jsx b/app/javascript/flavours/glitch/features/compose/components/language_dropdown.jsx index 14f285c3d..05614de01 100644 --- a/app/javascript/flavours/glitch/features/compose/components/language_dropdown.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/language_dropdown.jsx @@ -209,7 +209,7 @@ class LanguageDropdownMenu extends React.PureComponent { const { value } = this.props; return ( -
    +
    {lang[2]} ({lang[1]})
    ); diff --git a/app/javascript/flavours/glitch/features/compose/components/search.jsx b/app/javascript/flavours/glitch/features/compose/components/search.jsx index d2187b8ae..cb6afca8d 100644 --- a/app/javascript/flavours/glitch/features/compose/components/search.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/search.jsx @@ -147,7 +147,7 @@ class Search extends React.PureComponent { onBlur={this.handleBlur} /> -
    +
    diff --git a/app/javascript/flavours/glitch/features/compose/components/upload.jsx b/app/javascript/flavours/glitch/features/compose/components/upload.jsx index 63582c636..7d5784561 100644 --- a/app/javascript/flavours/glitch/features/compose/components/upload.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/upload.jsx @@ -43,7 +43,7 @@ export default class Upload extends ImmutablePureComponent { const y = ((focusY / -2) + .5) * 100; return ( -
    +
    {({ scale }) => (
    diff --git a/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.jsx b/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.jsx index 05fd68707..63a331086 100644 --- a/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.jsx +++ b/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.jsx @@ -182,7 +182,7 @@ class Conversation extends ImmutablePureComponent { return ( -
    +
    diff --git a/app/javascript/flavours/glitch/features/filters/select_filter.jsx b/app/javascript/flavours/glitch/features/filters/select_filter.jsx index b3285bc91..a33892f83 100644 --- a/app/javascript/flavours/glitch/features/filters/select_filter.jsx +++ b/app/javascript/flavours/glitch/features/filters/select_filter.jsx @@ -65,7 +65,7 @@ class SelectFilter extends React.PureComponent { } return ( -
    +
    {filter[1]} {warning}
    ); @@ -73,7 +73,7 @@ class SelectFilter extends React.PureComponent { renderCreateNew (name) { return ( -
    +
    ); diff --git a/app/javascript/flavours/glitch/features/list_editor/components/search.jsx b/app/javascript/flavours/glitch/features/list_editor/components/search.jsx index 94782ba69..3b66bc325 100644 --- a/app/javascript/flavours/glitch/features/list_editor/components/search.jsx +++ b/app/javascript/flavours/glitch/features/list_editor/components/search.jsx @@ -51,7 +51,7 @@ export default class Search extends React.PureComponent { /> -
    +
    diff --git a/app/javascript/flavours/glitch/features/list_editor/index.jsx b/app/javascript/flavours/glitch/features/list_editor/index.jsx index 8b8a0cf31..44951d1c6 100644 --- a/app/javascript/flavours/glitch/features/list_editor/index.jsx +++ b/app/javascript/flavours/glitch/features/list_editor/index.jsx @@ -60,7 +60,7 @@ class ListEditor extends ImmutablePureComponent { {accountIds.map(accountId => )}
    - {showSearch &&
    } + {showSearch &&
    } {({ x }) => diff --git a/app/javascript/flavours/glitch/features/list_timeline/index.jsx b/app/javascript/flavours/glitch/features/list_timeline/index.jsx index f885a751f..a32383b13 100644 --- a/app/javascript/flavours/glitch/features/list_timeline/index.jsx +++ b/app/javascript/flavours/glitch/features/list_timeline/index.jsx @@ -177,11 +177,11 @@ class ListTimeline extends React.PureComponent { multiColumn={multiColumn} >
    - -
    diff --git a/app/javascript/flavours/glitch/features/local_settings/navigation/item/index.jsx b/app/javascript/flavours/glitch/features/local_settings/navigation/item/index.jsx index a4d1b40fa..9ac6d9b73 100644 --- a/app/javascript/flavours/glitch/features/local_settings/navigation/item/index.jsx +++ b/app/javascript/flavours/glitch/features/local_settings/navigation/item/index.jsx @@ -60,7 +60,7 @@ export default class LocalSettingsPage extends React.PureComponent { -
    +
    diff --git a/app/javascript/flavours/glitch/features/notifications/components/admin_signup.jsx b/app/javascript/flavours/glitch/features/notifications/components/admin_signup.jsx index ead2a9701..d982108e9 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/admin_signup.jsx +++ b/app/javascript/flavours/glitch/features/notifications/components/admin_signup.jsx @@ -78,7 +78,7 @@ export default class NotificationFollow extends ImmutablePureComponent { // Renders. return ( -
    +
    diff --git a/app/javascript/flavours/glitch/features/notifications/components/clear_column_button.jsx b/app/javascript/flavours/glitch/features/notifications/components/clear_column_button.jsx index ee77cfb8e..cd150314b 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/clear_column_button.jsx +++ b/app/javascript/flavours/glitch/features/notifications/components/clear_column_button.jsx @@ -11,7 +11,7 @@ export default class ClearColumnButton extends React.Component { render () { return ( - + ); } diff --git a/app/javascript/flavours/glitch/features/notifications/components/follow.jsx b/app/javascript/flavours/glitch/features/notifications/components/follow.jsx index 434d6609d..e9ef70911 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/follow.jsx +++ b/app/javascript/flavours/glitch/features/notifications/components/follow.jsx @@ -78,7 +78,7 @@ export default class NotificationFollow extends ImmutablePureComponent { // Renders. return ( -
    +
    diff --git a/app/javascript/flavours/glitch/features/notifications/components/follow_request.jsx b/app/javascript/flavours/glitch/features/notifications/components/follow_request.jsx index 01dec320e..2b985bc08 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/follow_request.jsx +++ b/app/javascript/flavours/glitch/features/notifications/components/follow_request.jsx @@ -95,7 +95,7 @@ class FollowRequest extends ImmutablePureComponent { return ( -
    +
    diff --git a/app/javascript/flavours/glitch/features/notifications/components/grant_permission_button.jsx b/app/javascript/flavours/glitch/features/notifications/components/grant_permission_button.jsx index 798e4c787..5b2db48fd 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/grant_permission_button.jsx +++ b/app/javascript/flavours/glitch/features/notifications/components/grant_permission_button.jsx @@ -10,7 +10,7 @@ export default class GrantPermissionButton extends React.PureComponent { render () { return ( - ); diff --git a/app/javascript/flavours/glitch/features/pinned_accounts_editor/index.jsx b/app/javascript/flavours/glitch/features/pinned_accounts_editor/index.jsx index de3fff8ec..834de652f 100644 --- a/app/javascript/flavours/glitch/features/pinned_accounts_editor/index.jsx +++ b/app/javascript/flavours/glitch/features/pinned_accounts_editor/index.jsx @@ -59,7 +59,7 @@ class PinnedAccountsEditor extends ImmutablePureComponent { {accountIds.map(accountId => )}
    - {showSearch &&
    } + {showSearch &&
    } {({ x }) => diff --git a/app/javascript/flavours/glitch/features/report/components/option.jsx b/app/javascript/flavours/glitch/features/report/components/option.jsx index 6ecfc7a24..7827a6b3b 100644 --- a/app/javascript/flavours/glitch/features/report/components/option.jsx +++ b/app/javascript/flavours/glitch/features/report/components/option.jsx @@ -40,7 +40,7 @@ export default class Option extends React.PureComponent { -
    +
    - {icon && } + {icon && }
    {text}
    {meta}
    diff --git a/app/javascript/flavours/glitch/features/ui/components/column_link.jsx b/app/javascript/flavours/glitch/features/ui/components/column_link.jsx index dcdac077f..4fffa54f4 100644 --- a/app/javascript/flavours/glitch/features/ui/components/column_link.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/column_link.jsx @@ -32,7 +32,7 @@ const ColumnLink = ({ icon, text, to, onClick, href, method, badge, transparent, return onClick(e); }; return ( - + {iconElement} {text} {badgeElement} diff --git a/app/javascript/flavours/glitch/features/ui/components/media_modal.jsx b/app/javascript/flavours/glitch/features/ui/components/media_modal.jsx index a3811e91d..fd2bd43cf 100644 --- a/app/javascript/flavours/glitch/features/ui/components/media_modal.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/media_modal.jsx @@ -140,8 +140,8 @@ class MediaModal extends ImmutablePureComponent { const index = this.getIndex(); - const leftNav = media.size > 1 && ; - const rightNav = media.size > 1 && ; + const leftNav = media.size > 1 && ; + const rightNav = media.size > 1 && ; const content = media.map((image) => { const width = image.getIn(['meta', 'original', 'width']) || null; diff --git a/app/javascript/flavours/glitch/features/ui/components/onboarding_modal.jsx b/app/javascript/flavours/glitch/features/ui/components/onboarding_modal.jsx index df84a1571..29eb91a6b 100644 --- a/app/javascript/flavours/glitch/features/ui/components/onboarding_modal.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/onboarding_modal.jsx @@ -299,7 +299,7 @@ class OnboardingModal extends React.PureComponent {
    @@ -645,7 +645,7 @@ class Video extends React.PureComponent {