1
0
mirror of https://github.com/desktop/desktop synced 2024-06-30 22:54:41 +00:00

Fix accessibility of path errors

This commit is contained in:
Sergio Padrino 2024-06-27 17:51:35 +02:00
parent 26105fc89f
commit 4248e8d64e
2 changed files with 5 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import { exec } from 'child_process'
const execAsync = promisify(exec)
interface ICustomIntegrationFormProps {
readonly id: string
readonly path: string
readonly arguments: string
readonly onPathChanged: (path: string) => void
@ -48,6 +49,7 @@ export class CustomIntegrationForm extends React.Component<
value={this.state.path}
onValueChanged={this.onPathChanged}
placeholder="Path to executable"
ariaDescribedBy={`${this.props.id}-custom-integration-path-error`}
/>
<Button onClick={this.onChoosePath}>Choose</Button>
</div>
@ -81,7 +83,7 @@ export class CustomIntegrationForm extends React.Component<
return (
<div className="custom-integration-form-error">
<InputError
id="add-existing-repository-path-error"
id={`${this.props.id}-custom-integration-path-error`}
trackedUserInput={this.state.path}
ariaLiveMessage={msg.screenReaderMessage}
>

View File

@ -126,6 +126,7 @@ export class Integrations extends React.Component<
return (
<Row>
<CustomIntegrationForm
id="custom-editor"
path=""
arguments=""
onPathChanged={this.onCustomEditorPathChanged}
@ -165,6 +166,7 @@ export class Integrations extends React.Component<
return (
<Row>
<CustomIntegrationForm
id="custom-shell"
path=""
arguments=""
onPathChanged={this.onCustomEditorPathChanged}