Skip to content

Commit e28133d

Browse files
author
dashdashzako
committed
Reassign main landmark and label it
1 parent d2fe4ab commit e28133d

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

public/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</div>
3333
</noscript>
3434

35-
<main id="root"></main>
35+
<div id="root"></div>
3636

3737
<script>
3838
window.loggerEndpoint = 'http://localhost:3001/api/logs';

public/locales/en.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"additional-info.title": "Additional information",
3+
"application.label": "Aiana MOOC player",
34
"button.toggle.off": "off",
45
"button.toggle.on": "on",
56
"controls.add_bookmark": "Add bookmark",

public/locales/fr.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"additional-info.title": "Additional information",
3+
"application.label": "Lecteur de MOOC Aiana",
34
"button.toggle.off": "non",
45
"button.toggle.on": "oui",
56
"controls.add_bookmark": "Ajouter un signet",

src/components/Player.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ import MediaPlayer from './media/MediaPlayer';
2222
import MediaPlayerControls from './media/MediaPlayerControls';
2323
import TimeSpent from './time-management/TimeSpent';
2424
import InteractiveTranscript from './transcript/Transcript';
25+
import { useTranslation } from 'react-i18next';
2526

26-
const StyledDiv = styled.div`
27+
const Main = styled.main`
2728
height: 100%;
2829
width: 100%;
2930
max-height: 100%;
@@ -64,6 +65,7 @@ function byName(name: string): Filter {
6465

6566
function Player(props: IPlayerProps) {
6667
const [isDraggable, setDraggable] = useState(true);
68+
const [t] = useTranslation();
6769

6870
const { additionalInformationText, widgets, updateWidgetHandler } = props;
6971

@@ -78,7 +80,7 @@ function Player(props: IPlayerProps) {
7880
const transcriptWidget = widgets.find(byName(WIDGET_ID_TRANSCRIPT));
7981

8082
return (
81-
<StyledDiv>
83+
<Main aria-label={t('application.label')}>
8284
<div className="aip-widgets">
8385
{chaptersWidget && chaptersWidget.visible && (
8486
<ChaptersMenu
@@ -146,7 +148,7 @@ function Player(props: IPlayerProps) {
146148
</div>
147149
<TimelineBar display={false} />
148150
<MediaPlayerControls />
149-
</StyledDiv>
151+
</Main>
150152
);
151153
}
152154

src/components/app/ConnectedAiana.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface IDispatchProps {
3333

3434
interface IAiana extends IStateProps, IDispatchProps {}
3535

36-
const StyledDiv = styled.div`
36+
const Div = styled.div`
3737
background-color: ${(props) => props.theme.bg};
3838
color: ${(props) => props.theme.fg};
3939
@@ -101,7 +101,7 @@ function Aiana(props: IAiana) {
101101

102102
return (
103103
<ThemeProvider theme={themes[theme]}>
104-
<StyledDiv
104+
<Div
105105
className={classNames('aip-app', {
106106
'aip-app__fullscreen': isDocumentFullscreen()
107107
})}
@@ -111,7 +111,7 @@ function Aiana(props: IAiana) {
111111
textTransform: fontUppercase ? 'uppercase' : 'none'
112112
}}
113113
>
114-
<Suspense fallback={<Loader text="Media player is loading." />}>
114+
<Suspense fallback={<Loader />}>
115115
<SvgFilters />
116116
<div
117117
className="aip-player-wrapper"
@@ -124,7 +124,7 @@ function Aiana(props: IAiana) {
124124
</MediaContextProvider>
125125
</div>
126126
</Suspense>
127-
</StyledDiv>
127+
</Div>
128128
</ThemeProvider>
129129
);
130130
}

0 commit comments

Comments
 (0)