Skip to content

Commit db80f46

Browse files
authored
Merge pull request #1272 from julien/master
fix: add aria-label and title attributes for the image and video buttons
2 parents f8b4af1 + 44fdfad commit db80f46

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/assets/lang/language.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"secondary": "Secondary",
3939
"success": "Success",
4040
"table": "Insert Table",
41+
"video": "Insert Video",
4142
"videoPlaybackDisabled": "Video playback is disabled during edit mode",
4243
"warning": "Warning",
4344
"white": "White"

src/components/buttons/button-embed-video.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ class ButtonEmbedVideo extends React.Component {
4646
} else {
4747
return (
4848
<button
49+
aria-label={AlloyEditor.Strings.video}
4950
className="ae-button"
5051
data-type="button-embed-video"
5152
onClick={this.props.requestExclusive}
52-
tabIndex={this.props.tabIndex}>
53+
tabIndex={this.props.tabIndex}
54+
title={AlloyEditor.Strings.video}>
5355
<ButtonIcon symbol="video" />
5456
</button>
5557
);

src/components/buttons/button-item-selector-image.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ class ButtonItemSelectorImage extends React.Component {
1616
render() {
1717
return (
1818
<button
19+
aria-label={AlloyEditor.Strings.image}
1920
className="ae-button"
2021
data-type="button-image"
2122
onClick={this._handleClick}
22-
tabIndex={this.props.tabIndex}>
23+
tabIndex={this.props.tabIndex}
24+
title={AlloyEditor.Strings.image}>
2325
<ButtonIcon symbol="picture" />
2426
</button>
2527
);

0 commit comments

Comments
 (0)