mirror of
https://github.com/desktop/desktop
synced 2024-10-03 23:03:52 +00:00
Add aria labeling to our markdown iframes
This commit is contained in:
parent
f97aced2ba
commit
78fa283e35
|
@ -42,6 +42,10 @@ interface ISandboxedMarkdownProps {
|
|||
readonly markdownContext?: MarkdownContext
|
||||
|
||||
readonly underlineLinks: boolean
|
||||
|
||||
/** An area label to explain to screen reader users what the contents of the
|
||||
* iframe are before they navigate into them. */
|
||||
readonly ariaLabel: string
|
||||
}
|
||||
|
||||
interface ISandboxedMarkdownState {
|
||||
|
@ -378,6 +382,7 @@ export class SandboxedMarkdown extends React.PureComponent<
|
|||
className="sandboxed-markdown-component"
|
||||
sandbox=""
|
||||
ref={this.onFrameRef}
|
||||
aria-label={this.props.ariaLabel}
|
||||
/>
|
||||
{tooltipElements.map(e => (
|
||||
<Tooltip
|
||||
|
|
|
@ -176,6 +176,7 @@ export abstract class PullRequestCommentLike extends React.Component<IPullReques
|
|||
onMarkdownLinkClicked={this.onMarkdownLinkClicked}
|
||||
markdownContext={'PullRequestComment'}
|
||||
underlineLinks={this.props.underlineLinks}
|
||||
ariaLabel="Pull request markdown comment"
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -216,6 +216,7 @@ export class PullRequestQuickView extends React.Component<
|
|||
onMarkdownLinkClicked={this.onMarkdownLinkClicked}
|
||||
onMarkdownParsed={this.onMarkdownParsed}
|
||||
underlineLinks={this.props.underlineLinks}
|
||||
ariaLabel="Pull request markdown body"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -120,6 +120,7 @@ export class ReleaseNotes extends React.Component<IReleaseNotesProps, {}> {
|
|||
emoji={this.props.emoji}
|
||||
onMarkdownLinkClicked={this.onMarkdownLinkClicked}
|
||||
underlineLinks={this.props.underlineLinks}
|
||||
ariaLabel="Release notes generated from markdown"
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue