1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Desktop: Accessibility: Improve focus handling for plugin and prompt dialogs (#10801)

This commit is contained in:
Henry Heino
2024-07-31 06:10:58 -07:00
committed by GitHub
parent ecc4f3e22a
commit 596bcd8d8b
21 changed files with 230 additions and 165 deletions

View File

@ -5,13 +5,13 @@ import DialogButtonRow from './DialogButtonRow';
const { themeStyle } = require('@joplin/lib/theme');
const Countable = require('@joplin/lib/countable/Countable');
import markupLanguageUtils from '../utils/markupLanguageUtils';
import Dialog from './Dialog';
interface NoteContentPropertiesDialogProps {
themeId: number;
text: string;
markupLanguage: number;
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
onClose: Function;
onClose: ()=> void;
}
interface TextPropertiesMap {
@ -159,22 +159,20 @@ export default function NoteContentPropertiesDialog(props: NoteContentProperties
const readTimeLabel = _('Read time: %s min', formatReadTime(strippedReadTime));
return (
<div style={theme.dialogModalLayer}>
<div style={theme.dialogBox}>
<div style={dialogBoxHeadingStyle}>{_('Statistics')}</div>
<table>
<thead>
{tableHeader}
</thead>
<tbody>
{tableBodyComps}
</tbody>
</table>
<div style={{ ...labelCompStyle, marginTop: 10 }}>
{readTimeLabel}
</div>
<DialogButtonRow themeId={props.themeId} onClick={buttonRow_click} okButtonShow={false} cancelButtonLabel={_('Close')}/>
<Dialog onCancel={props.onClose}>
<div style={dialogBoxHeadingStyle}>{_('Statistics')}</div>
<table>
<thead>
{tableHeader}
</thead>
<tbody>
{tableBodyComps}
</tbody>
</table>
<div style={{ ...labelCompStyle, marginTop: 10 }}>
{readTimeLabel}
</div>
</div>
<DialogButtonRow themeId={props.themeId} onClick={buttonRow_click} okButtonShow={false} cancelButtonLabel={_('Close')}/>
</Dialog>
);
}