fix a11y issue for the list

This commit is contained in:
vaidankarswapnil 2022-01-19 19:54:36 +05:30
parent de5df90f75
commit 5d1a29d597
2 changed files with 31 additions and 23 deletions

View File

@ -12,7 +12,7 @@
margin: auto;
padding-left: 21px;
padding-right: 16px;
max-width: 1168px;;
max-width: 1168px;
> * {
justify-content: space-between;
@ -150,6 +150,14 @@
&.commonTasks {
li {
cursor: pointer;
.commonTaskList {
width: 100%;
> img {
margin-right: @DefaultSpace;
width: 24px;
height: 24px;
}
}
}
}

View File

@ -57,13 +57,13 @@ export class SplashScreen extends React.Component<SplashScreenProps> {
this.subscriptions = [];
}
public componentWillUnmount() {
public componentWillUnmount(): void {
while (this.subscriptions.length) {
this.subscriptions.pop().dispose();
}
}
public componentDidMount() {
public componentDidMount(): void {
this.subscriptions.push(
{
dispose: useNotebook.subscribe(
@ -131,13 +131,13 @@ export class SplashScreen extends React.Component<SplashScreenProps> {
key={`${item.title}${item.description}`}
onClick={item.onClick}
onKeyPress={(event: React.KeyboardEvent) => this.onSplashScreenItemKeyPress(event, item.onClick)}
tabIndex={0}
role="button"
>
<div className="commonTaskList" role="button" tabIndex={0}>
<img src={item.iconSrc} alt="" />
<span className="oneLineContent" title={item.info}>
{item.title}
</span>
</div>
</li>
))}
</ul>