Remove alt, use aria-label
This commit is contained in:
parent
87f961df3f
commit
b00d822bc0
5 changed files with 6 additions and 8 deletions
|
@ -26,7 +26,6 @@ export default createReactClass({
|
||||||
const w = this.props.w || 16;
|
const w = this.props.w || 16;
|
||||||
const h = this.props.h || 16;
|
const h = this.props.h || 16;
|
||||||
const imgClass = this.props.imgClassName || "";
|
const imgClass = this.props.imgClassName || "";
|
||||||
const alt = this.props.alt || _t("Loading...");
|
|
||||||
|
|
||||||
let divClass;
|
let divClass;
|
||||||
let imageSource;
|
let imageSource;
|
||||||
|
@ -45,7 +44,7 @@ export default createReactClass({
|
||||||
width={w}
|
width={w}
|
||||||
height={h}
|
height={h}
|
||||||
className={imgClass}
|
className={imgClass}
|
||||||
alt={alt}
|
aria-label={_t("Loading...")}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -20,7 +20,7 @@ import PropTypes from "prop-types";
|
||||||
import {_t} from "../../../languageHandler";
|
import {_t} from "../../../languageHandler";
|
||||||
import SettingsStore from "../../../settings/SettingsStore";
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
|
|
||||||
const Spinner = ({w = 32, h = 32, imgClassName, alt, message}) => {
|
const Spinner = ({w = 32, h = 32, imgClassName, message}) => {
|
||||||
let divClass;
|
let divClass;
|
||||||
let imageSource;
|
let imageSource;
|
||||||
if (SettingsStore.isFeatureEnabled('feature_new_spinner')) {
|
if (SettingsStore.isFeatureEnabled('feature_new_spinner')) {
|
||||||
|
@ -39,7 +39,7 @@ const Spinner = ({w = 32, h = 32, imgClassName, alt, message}) => {
|
||||||
width={w}
|
width={w}
|
||||||
height={h}
|
height={h}
|
||||||
className={imgClassName}
|
className={imgClassName}
|
||||||
alt={alt || _t("Loading...")}
|
aria-label={_t("Loading...")}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -48,7 +48,6 @@ Spinner.propTypes = {
|
||||||
w: PropTypes.number,
|
w: PropTypes.number,
|
||||||
h: PropTypes.number,
|
h: PropTypes.number,
|
||||||
imgClassName: PropTypes.string,
|
imgClassName: PropTypes.string,
|
||||||
alt: PropTypes.string,
|
|
||||||
message: PropTypes.node,
|
message: PropTypes.node,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ export default class MAudioBody extends React.Component {
|
||||||
// Not sure how tall the audio player is so not sure how tall it should actually be.
|
// Not sure how tall the audio player is so not sure how tall it should actually be.
|
||||||
return (
|
return (
|
||||||
<span className="mx_MAudioBody">
|
<span className="mx_MAudioBody">
|
||||||
<InlineSpinner alt={content.body} />
|
<InlineSpinner />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,7 +366,7 @@ export default class MImageBody extends React.Component {
|
||||||
|
|
||||||
// e2e image hasn't been decrypted yet
|
// e2e image hasn't been decrypted yet
|
||||||
if (content.file !== undefined && this.state.decryptedUrl === null) {
|
if (content.file !== undefined && this.state.decryptedUrl === null) {
|
||||||
placeholder = <InlineSpinner alt={content.body} w={32} h={32} />;
|
placeholder = <InlineSpinner w={32} h={32} />;
|
||||||
} else if (!this.state.imgLoaded) {
|
} else if (!this.state.imgLoaded) {
|
||||||
// Deliberately, getSpinner is left unimplemented here, MStickerBody overides
|
// Deliberately, getSpinner is left unimplemented here, MStickerBody overides
|
||||||
placeholder = this.getPlaceholder();
|
placeholder = this.getPlaceholder();
|
||||||
|
|
|
@ -148,7 +148,7 @@ export default createReactClass({
|
||||||
return (
|
return (
|
||||||
<span className="mx_MVideoBody">
|
<span className="mx_MVideoBody">
|
||||||
<div className="mx_MImageBody_thumbnail mx_MImageBody_thumbnail_spinner">
|
<div className="mx_MImageBody_thumbnail mx_MImageBody_thumbnail_spinner">
|
||||||
<InlineSpinner alt={content.body} />
|
<InlineSpinner />
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue