1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00

Desktop: Accessibility: Add accessible label to the "remove from share" button (#11233)

This commit is contained in:
Henry Heino 2024-10-26 13:06:25 -07:00 committed by GitHub
parent 4057aae300
commit 6cbdde578d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -256,6 +256,9 @@ const Button = React.forwardRef((props: Props, ref: any) => {
iconOnly={iconOnly}
onClick={onClick}
// When there's no title, the button needs a label. In this case, fall back
// to the tooltip.
aria-label={props.title ? undefined : props.tooltip}
aria-disabled={props.disabled}
aria-expanded={props['aria-expanded']}
aria-controls={props['aria-controls']}

View File

@ -321,7 +321,13 @@ function ShareFolderDialog(props: Props) {
<StyledRecipientName>{shareUser.user.email}</StyledRecipientName>
{dropdown}
<StyledRecipientStatusIcon title={statusToMessage[shareUser.status]} className={statusToIcon[shareUser.status]}></StyledRecipientStatusIcon>
<Button disabled={!enabled} size={ButtonSize.Small} iconName="far fa-times-circle" onClick={() => recipient_delete({ shareUserId: shareUser.id })}/>
<Button
disabled={!enabled}
size={ButtonSize.Small}
iconName="far fa-times-circle"
onClick={() => recipient_delete({ shareUserId: shareUser.id })}
tooltip={_('Remove %s from share', shareUser.user.email)}
/>
</StyledRecipient>
);
}