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

fix: replace onclick handlers with links for accessibility #824

Merged
merged 2 commits into from Jul 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion react/official/sidemenu/src/components/Menu.tsx
Expand Up @@ -30,7 +30,7 @@ const Menu: React.FunctionComponent<MenuProps> = ({ history, appPages }) => (
{appPages.map((appPage, index) => {
return (
<IonMenuToggle key={index} auto-hide="false">
<IonItem routerDirection="root" onClick={() => history.push(appPage.url)}>
<IonItem href={appPage.url}>
<IonIcon slot="start" icon={appPage.icon} />
<IonLabel>{appPage.title}</IonLabel>
</IonItem>
Expand Down
4 changes: 2 additions & 2 deletions react/official/tabs/src/pages/Tab2.tsx
Expand Up @@ -13,7 +13,7 @@ const Tab2: React.FunctionComponent<RouteComponentProps> = ({ history }) => {
</IonHeader>
<IonContent>
<IonList>
<IonItem href="/tab2/details" onClick={(e) => {e.preventDefault(); history.push('/tab2/details'); }}>
<IonItem href="/tab2/details">
<IonLabel>
<h2>Go to detail</h2>
</IonLabel>
Expand All @@ -24,4 +24,4 @@ const Tab2: React.FunctionComponent<RouteComponentProps> = ({ history }) => {
);
};

export default Tab2;
export default Tab2;