Merge pull request #1024 from ulyssear/a11y-helper-bar-links

Accessibility : Links in helper bar now have title attribute
This commit is contained in:
Peter Cottle 2022-10-10 11:30:34 -06:00 committed by GitHub
commit e0a16db5ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View file

@ -39,7 +39,8 @@ class HelperBarView extends React.Component {
key={'helper_bar_' + index}
onClick={item.onClick}
target="_blank"
href={item.href}>
href={item.href}
title={item.title}>
<i className={'icon-' + item.icon} />
{' '}
</a>
@ -49,7 +50,8 @@ class HelperBarView extends React.Component {
<a
data-testid={testID}
key={'helper_bar_' + index}
onClick={item.onClick}>
onClick={item.onClick}
title={item.title}>
{item.text ? item.text :
<i className={'icon-' + item.icon} />
}

View file

@ -56,18 +56,21 @@ class MainHelperBarView extends React.Component {
this.setState({
shownBar: BARS.COMMANDS
});
}.bind(this)
}.bind(this),
title: 'Show commands'
}, {
icon: 'globe',
onClick: function() {
this.setState({
shownBar: BARS.INTL
});
}.bind(this)
}.bind(this),
title: 'Show available languages'
}, {
newPageLink: true,
icon: 'twitter',
href: 'https://twitter.com/petermcottle'
href: 'https://twitter.com/petermcottle',
title: 'Follow me on Twitter'
}];
}