Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the encryption lock more accessible #1911

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/room/EncryptionLock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,22 @@ interface Props {
export const EncryptionLock: FC<Props> = ({ encrypted }) => {
const { t } = useTranslation();
const Icon = encrypted ? LockIcon : LockOffIcon;
const label = encrypted ? t("common.encrypted") : t("common.unencrypted");

return (
<Tooltip
label={encrypted ? t("common.encrypted") : t("common.unencrypted")}
side="right"
>
<Tooltip label={label} side="right">
<Icon
width={16}
height={16}
className={styles.lock}
data-encrypted={encrypted}
aria-label={label}
// Make the icon focusable so that the tooltip can be opened
// with keyboard navigation
// TODO: Replace this with the solution from
// https://github.com/vector-im/compound-web/pull/130 once it
// lands
tabIndex={0}
/>
</Tooltip>
);
Expand Down