From c82a24f39667bfd84244154e2c07e5b2a25befe9 Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Mon, 12 May 2025 09:08:03 -0400 Subject: [PATCH] [MM-62975][MM-62981] Invite Modal accessibility fixes (#30960) * [MM-62975] Convert results table to actual table instead of divs * [MM-62981] Ensure remove user button is focusable * fix playwright test * fix playwright test --------- Co-authored-by: yasserfaraazkhan --- .../invitation_modal/result_table.tsx | 51 ++++++++++--------- .../widgets/inputs/users_emails_input.tsx | 19 +++++-- 2 files changed, 42 insertions(+), 28 deletions(-) diff --git a/webapp/channels/src/components/invitation_modal/result_table.tsx b/webapp/channels/src/components/invitation_modal/result_table.tsx index 55fc3e2b1c..75c4affe83 100644 --- a/webapp/channels/src/components/invitation_modal/result_table.tsx +++ b/webapp/channels/src/components/invitation_modal/result_table.tsx @@ -90,22 +90,24 @@ export default function ResultTable(props: Props) { return (
{header} -
-
-
- -
-
- -
-
-
+ + + + + + + + {props.rows.map((invitation: InviteResult) => { let icon; let username; @@ -163,27 +165,26 @@ export default function ResultTable(props: Props) { } return ( -
-
+
+ + ); })} - - - + +
+ + + +
{icon} {username} {botBadge} {guestBadge} - -
+
{reason} - - +
); } diff --git a/webapp/channels/src/components/widgets/inputs/users_emails_input.tsx b/webapp/channels/src/components/widgets/inputs/users_emails_input.tsx index e38e60d540..7c2be22f58 100644 --- a/webapp/channels/src/components/widgets/inputs/users_emails_input.tsx +++ b/webapp/channels/src/components/widgets/inputs/users_emails_input.tsx @@ -262,9 +262,22 @@ export default class UsersEmailsInput extends React.PureComponent MultiValueRemove = (props: MultiValueRemoveProps) => { const {children, innerProps} = props; - return (
- {children || } -
); + return ( +
{ + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + e.stopPropagation(); + innerProps.onClick?.(e as unknown as React.MouseEvent); + } + }} + > + {children || } +
+ ); }; components = {