1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Desktop: Accessibility: Add accessibility information to the warning banner (#11775)

This commit is contained in:
Henry Heino
2025-02-06 09:57:12 -08:00
committed by GitHub
parent cc09f92d3b
commit c2c72215b9

View File

@@ -580,7 +580,14 @@ class MainScreenComponent extends React.Component<Props, State> {
return (
<div style={styles.messageBox}>
<span style={theme.textStyle}>{msg}</span>
<span
style={theme.textStyle}
role='alert'
// role='alert' has an implicit aria-live='assertive', which tells screen readers that changes
// to the warning's content should be announced as soon as possible. However, since it's generally
// okay for announcements related to these notifications to be delayed, use aria-live='polite'.
aria-live='polite'
>{msg}</span>
</div>
);
}