mirror of
https://github.com/desktop/desktop
synced 2024-11-05 20:49:32 +00:00
Use ariaLabel on misattributed warning learn more links
This commit is contained in:
parent
6d0c8c7796
commit
0889b4d2d0
3 changed files with 14 additions and 4 deletions
|
@ -148,8 +148,11 @@ export class CommitMessageAvatar extends React.Component<
|
|||
The email in your global Git config (
|
||||
<span className="git-email">{this.props.email}</span>) doesn't match
|
||||
your GitHub{accountTypeSuffix} account.{' '}
|
||||
<LinkButton uri="https://docs.github.com/en/github/committing-changes-to-your-project/why-are-my-commits-linked-to-the-wrong-user">
|
||||
Learn more about commit attribution.
|
||||
<LinkButton
|
||||
ariaLabel="Learn more about commit attribution"
|
||||
uri="https://docs.github.com/en/github/committing-changes-to-your-project/why-are-my-commits-linked-to-the-wrong-user"
|
||||
>
|
||||
Learn more
|
||||
</LinkButton>
|
||||
</div>
|
||||
</Row>
|
||||
|
|
|
@ -32,8 +32,11 @@ export class GitEmailNotFoundWarning extends React.Component<IGitEmailNotFoundWa
|
|||
<span className="warning-icon">⚠️</span> This email address doesn't
|
||||
match {this.getAccountTypeDescription()}, so your commits will be
|
||||
wrongly attributed.{' '}
|
||||
<LinkButton uri="https://docs.github.com/en/github/committing-changes-to-your-project/why-are-my-commits-linked-to-the-wrong-user">
|
||||
Learn more about commit attribution.
|
||||
<LinkButton
|
||||
ariaLabel="Learn more about commit attribution"
|
||||
uri="https://docs.github.com/en/github/committing-changes-to-your-project/why-are-my-commits-linked-to-the-wrong-user"
|
||||
>
|
||||
Learn more
|
||||
</LinkButton>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -28,6 +28,9 @@ interface ILinkButtonProps {
|
|||
|
||||
/** title-text or tooltip for the link */
|
||||
readonly title?: string
|
||||
|
||||
/** aria-label for the link */
|
||||
readonly ariaLabel?: string
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,6 +56,7 @@ export class LinkButton extends React.Component<ILinkButtonProps, {}> {
|
|||
onMouseOut={this.props.onMouseOut}
|
||||
onClick={this.onClick}
|
||||
tabIndex={this.props.tabIndex}
|
||||
aria-label={this.props.ariaLabel}
|
||||
>
|
||||
{title && <Tooltip target={this.anchorRef}>{title}</Tooltip>}
|
||||
{this.props.children}
|
||||
|
|
Loading…
Reference in a new issue