Skip to content

Commit

Permalink
Add accessibility text
Browse files Browse the repository at this point in the history
  • Loading branch information
devgg committed Mar 31, 2019
1 parent 876c7eb commit 8a4b830
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion frontend/src/AppContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Navigation extends Component {

class SocialButton extends Component {
render() {
const linkName = this.props.displayName + " on " + this.props.name;
return (
<Popup
on="hover"
Expand All @@ -47,6 +48,7 @@ class SocialButton extends Component {
target="_blank"
rel="noopener noreferrer"
href={this.props.url}
aria-label={linkName}
>
<Button.Content visible>
<Icon name={this.props.icon} />
Expand All @@ -58,7 +60,7 @@ class SocialButton extends Component {
}
>
<Popup.Content>
{this.props.displayName + " on " + this.props.name}
{linkName}
</Popup.Content>
</Popup>
);
Expand Down Expand Up @@ -89,6 +91,7 @@ class LanguageDescription extends Component {
<Image
className="LanguageDescription-image"
src={this.props.image_url}
alt={"logo of the " + this.props.displayName + " programming language"}
/>
<div
className="LanguageDescription-text"
Expand Down
12 changes: 10 additions & 2 deletions frontend/src/Repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ class Repository extends Component {
<Segment>
<Responsive minWidth={1000}>
<div className="Repository-container">
<Image src={this.props.avatar_url} size="tiny" />
<Image
src={this.props.avatar_url}
size="tiny"
alt={"github avatar of " + this.props.name_with_owner}
/>
<Stats
num_stars={this.props.num_stars}
num_forks={this.props.num_forks}
Expand All @@ -165,7 +169,11 @@ class Repository extends Component {
<Responsive maxWidth={999}>
<div className="Repository-container">
<div className="Repository-header">
<Image src={this.props.avatar_url} size="tiny" />
<Image
src={this.props.avatar_url}
size="tiny"
alt={"github avatar of " + this.props.name_with_owner}
/>
<Stats
num_stars={this.props.num_stars}
num_forks={this.props.num_forks}
Expand Down

0 comments on commit 8a4b830

Please sign in to comment.