Skip to content

Instantly share code, notes, and snippets.

@yuschick
Last active November 9, 2017 11:24
Show Gist options
  • Save yuschick/02d66c473151fabe402e308936b46441 to your computer and use it in GitHub Desktop.
Save yuschick/02d66c473151fabe402e308936b46441 to your computer and use it in GitHub Desktop.
Accessible Web Apps with React, TypeScript & Ally.js
interface Handle {
disengage(): void;
}
class Dialog extends React.Component<Props, {}> {
dialog: HTMLElement | null;
disabledHandle: Handle;
componentDidMount() {
this.disabledHandle = Disabled({
filter: this.dialog,
});
}
componentWillUnmount() {
this.disabledHandle.disengage();
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment