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

a11y: ensure there is only one main landmark #9074

Merged
merged 2 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
22 changes: 0 additions & 22 deletions Composer/packages/client/src/components/MainContent.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ const AddLanguageModal: React.FC<IAddLanguageModalProps> = (props) => {
}, [currentLanguages]);

const searchBoxLabelId = useId('search-box-label');
const searchBoxId = useId('search-box');
const translationsLabelId = useId('translations-label');

const onSearch = (_e, newValue) => {
Expand Down Expand Up @@ -196,8 +197,11 @@ const AddLanguageModal: React.FC<IAddLanguageModalProps> = (props) => {
)}
/>
</div>
<Label id={searchBoxLabelId}>{MultiLanguagesDialog.ADD_DIALOG.selectionTitle}</Label>
<Label id={searchBoxLabelId} htmlFor={searchBoxId}>
{MultiLanguagesDialog.ADD_DIALOG.selectionTitle}
</Label>
<SearchBox
id={searchBoxId}
disableAnimation
aria-labelledBy={searchBoxLabelId}
placeholder={MultiLanguagesDialog.ADD_DIALOG.searchPlaceHolder}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ interface PluginHostProps {
pluginType: PluginType;
bundleId: string;
projectId: string;
role?: string;
}

/** Binds closures around Composer client code to plugin iframe's window object */
Expand Down Expand Up @@ -136,7 +137,7 @@ export const PluginHost: React.FC<PluginHostProps> = (props) => {
}, [shell]);

return (
<div css={containerStyles}>
<div css={containerStyles} role={props.role}>
<iframe
key={`${pluginName}.${bundleId}.${pluginType}`}
ref={targetRef}
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/src/pages/design/DesignPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const DesignPage: React.FC<RouteComponentProps<{ dialogId: string; projectId: st
</div>
</div>

<div css={contentWrapper} role="main">
OEvgeny marked this conversation as resolved.
Show resolved Hide resolved
<div css={contentWrapper}>
<CommandBar projectId={activeBot} />
<Conversation css={splitPaneContainer}>
<div css={splitPaneWrapper}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const PluginPageContainer: React.FC<RouteComponentProps<{ pluginId: string; bund
return null;
}

return <PluginHost bundleId={bundleId} pluginName={pluginId} pluginType="page" projectId={projectId} />;
return <PluginHost bundleId={bundleId} pluginName={pluginId} pluginType="page" role="main" projectId={projectId} />;
};

export { PluginPageContainer };