Keyboard shortcuts and accessibility

This commit is contained in:
Scott Nonnenberg 2019-11-07 13:36:16 -08:00
parent 8590a047c7
commit 20a892247f
87 changed files with 3652 additions and 711 deletions

View file

@ -18,7 +18,14 @@ export type OwnProps = {
export type Props = OwnProps;
function focusOnRender(el: HTMLElement | null) {
if (el) {
el.focus();
}
}
export const StickerManager = React.memo(
// tslint:disable-next-line max-func-body-length
({
installedPacks,
receivedPacks,
@ -69,7 +76,11 @@ export const StickerManager = React.memo(
uninstallStickerPack={uninstallStickerPack}
/>
) : null}
<div className="module-sticker-manager">
<div
className="module-sticker-manager"
tabIndex={-1}
ref={focusOnRender}
>
{[
{
i18nKey: 'stickers--StickerManager--InstalledPacks',