mirror of
https://github.com/mue/mue.git
synced 2026-07-16 05:23:49 +02:00
fix: accessibility issues + tooltip
This commit is contained in:
@@ -76,7 +76,7 @@ class Maximise extends PureComponent {
|
||||
<Tooltip
|
||||
title={variables.getMessage('modals.main.settings.sections.background.buttons.view')}
|
||||
>
|
||||
<button style={{ fontSize: this.props.fontSize }} onClick={this.maximise}>
|
||||
<button style={{ fontSize: this.props.fontSize }} onClick={this.maximise} aria-label={variables.getMessage('modals.main.settings.sections.background.buttons.view')}>
|
||||
<MdCropFree className="topicons" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
||||
@@ -115,7 +115,11 @@ class Navbar extends PureComponent {
|
||||
title={variables.getMessage('widgets.navbar.tooltips.refresh')}
|
||||
subtitle={this.state.refreshText}
|
||||
>
|
||||
<button onClick={() => this.refresh()} style={{ fontSize: this.state.zoomFontSize }}>
|
||||
<button
|
||||
onClick={() => this.refresh()}
|
||||
style={{ fontSize: this.state.zoomFontSize }}
|
||||
aria-label={variables.getMessage('widgets.navbar.tooltips.refresh')}
|
||||
>
|
||||
<MdRefresh className="refreshicon topicons" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
@@ -130,6 +134,11 @@ class Navbar extends PureComponent {
|
||||
<button
|
||||
onClick={() => this.props.openModal('mainModal')}
|
||||
style={{ fontSize: this.state.zoomFontSize }}
|
||||
aria-label={variables.getMessage('modals.main.navbar.settings', {
|
||||
type: variables.getMessage(
|
||||
'modals.main.navbar.tooltips.refresh_' + this.refreshValue,
|
||||
),
|
||||
})}
|
||||
>
|
||||
<MdSettings className="settings-icon topicons" />
|
||||
</button>
|
||||
|
||||
@@ -97,6 +97,7 @@ class Notes extends PureComponent {
|
||||
onBlur={() => this.hideNotes()}
|
||||
ref={this.props.notesRef}
|
||||
style={{ fontSize: this.state.zoomFontSize }}
|
||||
aria-label={variables.getMessage('widgets.navbar.notes.title')}
|
||||
>
|
||||
<MdAssignment className="topicons" />
|
||||
</button>
|
||||
|
||||
@@ -25,28 +25,28 @@ export default class Quote extends PureComponent {
|
||||
buttons = {
|
||||
share: (
|
||||
<Tooltip title={variables.getMessage('widgets.quote.share')}>
|
||||
<button onClick={() => this.setState({ shareModal: true })}>
|
||||
<button onClick={() => this.setState({ shareModal: true })} aria-label={variables.getMessage('widgets.quote.share')}>
|
||||
<MdIosShare className="copyButton" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
),
|
||||
copy: (
|
||||
<Tooltip title={variables.getMessage('widgets.quote.copy')}>
|
||||
<button onClick={() => this.copyQuote()}>
|
||||
<button onClick={() => this.copyQuote()} aria-label={variables.getMessage('widgets.quote.copy')}>
|
||||
<MdContentCopy className="copyButton" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
),
|
||||
unfavourited: (
|
||||
<Tooltip title={variables.getMessage('widgets.quote.favourite')}>
|
||||
<button onClick={() => this.favourite()}>
|
||||
<button onClick={() => this.favourite()} aria-label={variables.getMessage('widgets.quote.favourite')}>
|
||||
<MdStarBorder className="copyButton" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
),
|
||||
favourited: (
|
||||
<Tooltip title={variables.getMessage('widgets.quote.unfavourite')}>
|
||||
<button onClick={() => this.favourite()}>
|
||||
<button onClick={() => this.favourite()} aria-label={variables.getMessage('widgets.quote.unfavourite')}>
|
||||
<MdStar className="copyButton" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
@@ -436,6 +436,7 @@ export default class Quote extends PureComponent {
|
||||
className="quoteAuthorLink"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="Learn about the author of the quote."
|
||||
>
|
||||
{this.state.author}
|
||||
</a>
|
||||
@@ -481,6 +482,7 @@ export default class Quote extends PureComponent {
|
||||
className="quoteAuthorLink"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="Learn about the author of the quote."
|
||||
>
|
||||
<MdOpenInNew />
|
||||
</a>{' '}
|
||||
|
||||
@@ -100,7 +100,7 @@ export default class Search extends PureComponent {
|
||||
|
||||
if (localStorage.getItem('voiceSearch') === 'true') {
|
||||
microphone = (
|
||||
<button onClick={this.startSpeechRecognition} ref={this.micIcon}>
|
||||
<button onClick={this.startSpeechRecognition} ref={this.micIcon} aria-label="Microphone Search">
|
||||
<MdMic className="micIcon" />
|
||||
</button>
|
||||
);
|
||||
@@ -211,6 +211,7 @@ export default class Search extends PureComponent {
|
||||
title={variables.getMessage('modals.main.settings.sections.search.search_engine')}
|
||||
>
|
||||
<button
|
||||
aria-label="Search Engine"
|
||||
onClick={() => this.setState({ searchDropdown: !this.state.searchDropdown })}
|
||||
>
|
||||
{this.getSearchDropdownicon(this.state.currentSearch)}
|
||||
@@ -228,7 +229,7 @@ export default class Search extends PureComponent {
|
||||
<form onSubmit={this.searchButton} className="searchBar">
|
||||
<div className={this.state.classList}>
|
||||
<Tooltip title={variables.getMessage('widgets.search')}>
|
||||
<button onClick={this.searchButton}>
|
||||
<button onClick={this.searchButton} aria-label="Search">
|
||||
<MdSearch />
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
||||
Reference in New Issue
Block a user